Details
-
Enhancement
-
Resolution: Fixed
-
P5
-
8
-
None
-
b105
-
generic
-
generic
Description
var foo = {};
foo instanceof bar;
or
var foo = {};
foo instanceof 5;
Both of these yield the following error message: "instanceof cannot be used on objects without [[HasInstance]]", which is confusing.
Perhaps, instead, something along the lines of "instanceof may only be called with a type as the right-hand argument."
foo instanceof bar;
or
var foo = {};
foo instanceof 5;
Both of these yield the following error message: "instanceof cannot be used on objects without [[HasInstance]]", which is confusing.
Perhaps, instead, something along the lines of "instanceof may only be called with a type as the right-hand argument."