An issue about evaluating instanceof #6507
Labels
Comments
This Bug would be a good first issue for a new or beginning contributor to dig into, would need to investigate JavascriptOperators::OP_IsInst and see how/through what path it can fail to check prototypes for an @@hasInstance tag. Also whilst doing it the switch IsES6HasInstanceEnabled which appears there should be removed from the codebase - check #6415 for info on removing switches. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to ES10.0, If an object does not define or inherit
@@hasInstance
it uses the defaultinstanceof
semantics. When changing the value of__proto__
of an object intoString
, the algorithm to be used will beFunction.prototype [ @@hasInstance ]
instead of the default semantics. So the output of the testcase below isfalse
as other engines do. This may be an issue of chakra.version
command
testcase
output
expected output
contributor:@YuanWangC
The text was updated successfully, but these errors were encountered: