archives

« Bugzilla Issues Index

#1752 — 13.5 Class Runtime Semantics: extra Type(superclass) call


On chapter 13.5.1.2 Runtime Semantics item 2.d calls Type(superclass), however on item 2.e we call for the IsContructor(superclass).
1. Else if Type(superclass) is not Object, throw a TypeError exception.
2. Else if IsConstructor(superclass) is false, then throw a TypeError exception.

If we look at the definition of the function IsConstructor, it is already is calling Type(superclass):
1. If Type(argument) is not Object, return false.
2. If argument has a [[Construct]] internal method, return true.
3. Return false.

So the extra call for Type(superclass) is not necessary in 13.5.1.2


fixed in rev17 editor's draft


fixed in rev17, August 23, 2013 draft