archives

« Bugzilla Issues Index

#4549 — Special [[GetOwnPropertyName]] method for functions?


[§9.2 ECMAScript Function Objects](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects) contains the sentence (in the last paragraph):

| ECMAScript function objects whose code is not strict mode code have the
| [[GetOwnProperty]] internal method defined here.

and also [§9.4.1 Bound Function Exotic Objects](http://www.ecma-international.org/ecma-262/6.0/#sec-bound-function-exotic-objects) says

| Unlike ECMAScript function objects, bound function objects do not use
| an alternative definition of the [[GetOwnProperty]] internal methods.

Wait what? I could not find any [[GetOwnProperty]] method for functions in the spec, so at least the "defined here part" is wrong :-) I see that we have customisations of the ordinary object one for proxies, arguments objects, namespaces, integer-indexed objects and strings, but I can't even imagine why we would have a custom one for functions.

(not sure whether this is an editorial or technical issue)


This is a leftover from ES5. 9.2 is already updated (bug 4458, https://github.com/tc39/ecma262/commit/f469b0cb6162cf06524a09ef7e768a5ecd2e5db4), but apparently I've missed the note in 9.4.1.


Fixed in ES2016 Draft (5fd2e72).