mirror of https://github.com/tc39/test262.git
Fixes for forbidden property names
# Conflicts: # src/class-fields/propname-error/cls-decl-variable-name.template # src/class-fields/propname-error/cls-expr-variable-name.template
This commit is contained in:
parent
ea643db26f
commit
d361aaadb8
|
@ -14,10 +14,9 @@ info: |
|
|||
|
||||
var /*{ propname }*/ = 'foo';
|
||||
class C {
|
||||
[/*{ propname }*/];
|
||||
/*{ static }*/ [/*{ propname }*/];
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(c.hasOwnProperty("foo"), true);
|
||||
assert.sameValue(C.hasOwnProperty("foo"), false);
|
||||
|
|
|
@ -14,10 +14,9 @@ info: |
|
|||
|
||||
var /*{ propname }*/ = 'foo';
|
||||
var C = class {
|
||||
[/*{ propname }*/];
|
||||
};
|
||||
/*{ static }*/ [/*{ propname }*/];
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
assert.sameValue(c.hasOwnProperty("foo"), true);
|
||||
|
||||
assert.sameValue(C.hasOwnProperty("foo"), false);
|
||||
assert.sameValue(c.hasOwnProperty("foo"), true);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Static class field cannot have PropName 'constructor'
|
||||
desc: static class field forbid PropName 'constructor'
|
||||
info: |
|
||||
|
||||
// This test file tests the following early error:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Static class fields cannot have PropName 'prototype'
|
||||
desc: static class fields forbid PropName 'prototype'
|
||||
info: |
|
||||
|
||||
// This test file tests the following early error:
|
||||
|
|
Loading…
Reference in New Issue