Closed Bug 73555 Opened 23 years ago Closed 23 years ago

NativeError constructors have wrong [[Class]] property

Categories

(Rhino Graveyard :: Core, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: pschwartau, Assigned: norrisboyd)

References

()

Details

The testcase above has been newly added to the JS test suite. 
It is passing in SpiderMonkey, but failing in Rhino:


BUGNUMBER: 56868
STATUS: Testing the internal [[Class]] property of native error constructors
*-* Testcase ecma_3/Object/class-004.js failed:
Failure messages were:

FAILED!: Current constructor is: EvalError
FAILED!: Expected value 'Function', Actual value 'NativeMethod'

FAILED!: Current constructor is: RangeError
FAILED!: Expected value 'Function', Actual value 'NativeMethod'

FAILED!: Current constructor is: ReferenceError
FAILED!: Expected value 'Function', Actual value 'NativeMethod'

FAILED!: Current constructor is: SyntaxError
FAILED!: Expected value 'Function', Actual value 'NativeMethod'

FAILED!: Current constructor is: TypeError
FAILED!: Expected value 'Function', Actual value 'NativeMethod'

FAILED!: Current constructor is: URIError
FAILED!: Expected value 'Function', Actual value 'NativeMethod'



I would expect the [[Class]] property of any JS constructor to be 'Function'.
Notice Rhino does give 'Function' as the [[Class]] property of Error.
Fixed.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
VERIFIED FIXED with rhino and rhinoi shells built on WinNT 2001-03-27.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.