mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1199172 - Only treat non-static constructor methods as the actual class constructor. (r=shu)
This commit is contained in:
parent
4bb887fa2a
commit
6d419d0546
@ -7461,7 +7461,8 @@ BytecodeEmitter::emitClass(ParseNode* pn)
|
||||
for (ParseNode* mn = classMethods->pn_head; mn; mn = mn->pn_next) {
|
||||
ClassMethod& method = mn->as<ClassMethod>();
|
||||
ParseNode& methodName = method.name();
|
||||
if (methodName.isKind(PNK_OBJECT_PROPERTY_NAME) &&
|
||||
if (!method.isStatic() &&
|
||||
methodName.isKind(PNK_OBJECT_PROPERTY_NAME) &&
|
||||
methodName.pn_atom == cx->names().constructor)
|
||||
{
|
||||
constructor = &method.method();
|
||||
|
@ -3,6 +3,21 @@ class test {
|
||||
constructor() { }
|
||||
static constructor() { }
|
||||
}
|
||||
|
||||
class testWithExtends {
|
||||
constructor() { };
|
||||
static constructor() { };
|
||||
}
|
||||
|
||||
class testOrder {
|
||||
static constructor() { };
|
||||
constructor() { };
|
||||
}
|
||||
|
||||
class testOrderWithExtends extends null {
|
||||
static constructor() { };
|
||||
constructor() { };
|
||||
}
|
||||
`;
|
||||
|
||||
if (classesEnabled())
|
||||
|
Loading…
Reference in New Issue
Block a user