« Bugzilla Issues Index
#3223 — static get constructor should be valid
- bug_id:
3223
- creation_ts:
2014-09-15 07:59:00 -0700
- short_desc:
static get constructor should be valid
- delta_ts:
2015-07-10 08:34:18 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 27: August 24, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
INVALID
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
Erik Arvidsson
- assigned_to:
Allen Wirfs-Brock
- cc:
erik.arvidsson
- commentid:
10188
- comment_count:
0
- who:
Erik Arvidsson
- bug_when:
2014-09-15 07:59:20 -0700
The spec says that
*constructor() {}
get constructor() {}
set constructor(_) {}
are invalid (due to SpecialMethod) but it allows:
static constructor() {}
Due to the rules of specialMethod
static *constructor() {}
static get constructor() {}
static set constructor(_) {}
are all also invalid. For consistency we should allow all forms for static.
- commentid:
10290
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2014-10-08 11:42:51 -0700
I don't see how the spec. currently says that.
The 14.5.1 early errors only apply the "PropName is 'constructor' and SpecialMethod is true" rule to productions:
ClassElement : MethodDefinition
it doesn't apply it for
ClassElement : 'static' MethodDefinition
- commentid:
10294
- comment_count:
2
- who:
Erik Arvidsson
- bug_when:
2014-10-08 12:05:54 -0700
You are correct. For some reason I thought it would recurse into the `static MethodDefinition`.