scope-name-lex-close.js (592B)
1 // Copyright (C) 2016 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-runtime-semantics-classdefinitionevaluation 5 description: Removal of lexical environment for class "name" 6 info: | 7 [...] 8 22. Set the running execution context's LexicalEnvironment to lex. 9 [...] 10 ---*/ 11 12 class C { 13 method() { 14 return C; 15 } 16 } 17 18 var cls = C; 19 assert.sameValue(typeof C, 'function'); 20 C = null; 21 assert.sameValue(C, null); 22 assert.sameValue(cls.prototype.method(), cls, 'from instance method'); 23 24 reportCompare(0, 0);