You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behaviour
Going by other JavaScript engines including V8, SpiderMonkey and JavaScriptCore I'd expect a TypeError to be thrown.
Additional context
This was found using comparative testing between multiple JavaScript engines. This could very much come down to a design choice. I just wanted to let you know in case it is not intentional
The text was updated successfully, but these errors were encountered:
marccarigiet
changed the title
Lack of Error Thrown when Using 'in' Operator on Non-Objects i
Lack of Error Thrown when Using 'in' Operator on Non-Objects
Nov 7, 2023
Description
'in' applied to non-objects do not throw an error.
Test case
Test code to reproduce the behaviour:
Expected behaviour
Going by other JavaScript engines including V8, SpiderMonkey and JavaScriptCore I'd expect a TypeError to be thrown.
Additional context
This was found using comparative testing between multiple JavaScript engines. This could very much come down to a design choice. I just wanted to let you know in case it is not intentional
The text was updated successfully, but these errors were encountered: