private-field-in.js (624B)
1 // |reftest| error:SyntaxError 2 // Copyright 2021 the V8 project authors. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 description: Requires the `In` parsing parameter 7 info: | 8 Syntax 9 RelationalExpression[In, Yield, Await]: 10 [...] 11 [+In]PrivateIdentifier in ShiftExpression[?Yield, ?Await] 12 esid: sec-relational-operators-runtime-semantics-evaluation 13 negative: 14 phase: parse 15 type: SyntaxError 16 features: [class-fields-private, class-fields-private-in] 17 ---*/ 18 19 $DONOTEVALUATE(); 20 21 class C { 22 #field; 23 24 constructor() { 25 for (#field in value;;) break; 26 } 27 }