This does not produce a syntax error, but it should because there is no#xproperty. classC{x=1;method(){obj.#x;}} It seems syntax checker is confusing public propertyxwith private property#x. If you rename the public property, it works as expected. Oxc playground #xonobjnot onthis?
Private fields in computed keys resolve to private properties ofenclosingclass. Soobj.#xdoes not referenceC's#xbinding here, and in both cases it should be a syntax error: classC{#x;[obj.#x](){}[obj.#x]=123;}
Babel (pronounced "babble") is a community-driven project used by many companies and projects, and is maintained by a group of volunteers. If you'd like to help support the future of the project, please consider: Giving developer time on the project. (Message us on Twitter or Slack for ...
Code Issues Pull requests Created as a mini project for "Software Construction" course @ Open University of Sri Lanka yacc syntax-analyzer bison-yacc lexx Updated Nov 18, 2020 C zarif98sjs / Yet-Another-C-Compiler Star 3 Code Issues Pull requests A subset C compiler made with flex,...
For most type-checkers, annotated class members would contribute to the type produced by constructing a given class. In the above example, a type-checker could assume a new type namedPerson, with a propertynameof typestringand a methodgetGreetingthat returns astring; but like any other syntax ...