blob: 1d548e6cafdb8365125f91e98ebf8bd6a357b382 [file] [edit]
// Copyright (C) 2017 Mike Pennisi. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/class/accessor-name-inst/
name: Class declaration, instance method
esid: sec-runtime-semantics-classdefinitionevaluation
info: |
[...]
21. For each ClassElement m in order from methods
a. If IsStatic of m is false, then
i. Let status be the result of performing PropertyDefinitionEvaluation
for m with arguments proto and false.
features: [class]
---*/
var stringSet;
class C {
get /*{ declareWith }*/() { return 'get string'; }
set /*{ declareWith }*/(param) { stringSet = param; }
}
assert.sameValue(C.prototype[/*{ referenceWith }*/], 'get string');
C.prototype[/*{ referenceWith }*/] = 'set string';
assert.sameValue(stringSet, 'set string');