Merge pull request #1572 from rwaldron/super-property-reference

SuperProperty evaluation order
This commit is contained in:
Leo Balter 2018-06-22 16:42:22 -04:00 committed by GitHub
commit 9bddfaea22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 31 additions and 14 deletions

View File

@ -0,0 +1,17 @@
// Copyright (C) 2018 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-makesuperpropertyreference
description: >
SuperProperty evaluation order: super() thisBinding initialization must occur first.
---*/
class Derived extends Object {
constructor() {
super[super()];
throw new Test262Error();
}
}
assert.throws(ReferenceError, function() {
new Derived();
}, '`super[super()]` via `new Derived()` throws a ReferenceError');

View File

@ -1,7 +1,7 @@
// Copyright (C) 2014 the V8 project authors. All rights reserved. // Copyright (C) 2014 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
es6id: 14.5 esid: sec-makesuperpropertyreference
description: > description: >
class super in constructor class super in constructor
---*/ ---*/

View File

@ -1,7 +1,7 @@
// Copyright (C) 2014 the V8 project authors. All rights reserved. // Copyright (C) 2014 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
es6id: 14.5 esid: sec-makesuperpropertyreference
description: > description: >
class super in getter class super in getter
---*/ ---*/

View File

@ -1,7 +1,7 @@
// Copyright (C) 2014 the V8 project authors. All rights reserved. // Copyright (C) 2014 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
es6id: 14.5 esid: sec-makesuperpropertyreference
description: > description: >
class super in methods class super in methods
---*/ ---*/

View File

@ -1,7 +1,7 @@
// Copyright (C) 2014 the V8 project authors. All rights reserved. // Copyright (C) 2014 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
es6id: 14.5 esid: sec-makesuperpropertyreference
description: > description: >
class super in setter class super in setter
---*/ ---*/

View File

@ -1,7 +1,7 @@
// Copyright (C) 2014 the V8 project authors. All rights reserved. // Copyright (C) 2014 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
es6id: 14.5 esid: sec-makesuperpropertyreference
description: > description: >
class super in static getter class super in static getter
---*/ ---*/

View File

@ -1,7 +1,7 @@
// Copyright (C) 2014 the V8 project authors. All rights reserved. // Copyright (C) 2014 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
es6id: 14.5 esid: sec-makesuperpropertyreference
description: > description: >
class super in static methods class super in static methods
---*/ ---*/

View File

@ -1,7 +1,7 @@
// Copyright (C) 2014 the V8 project authors. All rights reserved. // Copyright (C) 2014 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
es6id: 14.5 esid: sec-makesuperpropertyreference
description: > description: >
class super in static setter class super in static setter
---*/ ---*/