« Bugzilla Issues Index
#3766 — 14.3.9 DefineMethod: Allocate function object with [[Construct]] method for class constructors
- bug_id:
3766
- creation_ts:
2015-02-05 13:38:00 -0800
- short_desc:
14.3.9 DefineMethod: Allocate function object with [[Construct]] method for class constructors
- delta_ts:
2015-02-12 12:17:34 -0800
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 32: February 2, 2015 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
12136
- comment_count:
0
- who:
André Bargull
- bug_when:
2015-02-05 13:38:40 -0800
14.3.9 Runtime Semantics: DefineMethod
Step 5:
When FunctionCreate is called with FunctionKind=Method, the resulting function object will not have a [[Construct]] internal method. This is incorrect if DefineMethod is called from ClassDefinitionEvaluation.
A simple solution to fix this:
> 5. If the optional parameter functionPrototype was provided, let kind be Normal; else let kind be Method.
> 6. Let closure be FunctionCreate(kind, StrictFormalParameters, ...
Because we know that only ClassDefinitionEvaluation provides the optional functionPrototype parameter.
- commentid:
12187
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2015-02-06 09:45:03 -0800
fixed in rev33 editor's draft
- commentid:
12387
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2015-02-12 12:17:34 -0800
fixed in rev33