archives

« Bugzilla Issues Index

#2739 — 14.5.17 ClassDefinitionEvaluation: Necessary to preserve evaluation order for static/prototype method definitions?


14.5.17 Runtime Semantics: ClassDefinitionEvaluation

All prototype method definitions are evaluated before any static method definition, which breaks source code definition order. This is visible by using computed property names. Is it necessary to preserve original source code definition order?

test case:
---
class C {
static [(print("static def"), "")] () { }
[(print("proto def"), "")] () { }
}
---

Expected output: ?
Actual output: "proto def" and then "static def"


fixed in rev25 editor's draft


fixed in rev25 editor's draft