Open
Description
- Plattform: [Linux, Ubuntu 20.04]
Description
'in' applied to non-objects do not throw an error.
Test case
Test code to reproduce the behaviour:
'example' in true;
'example' in false;
'example' in undefined;
'example' in null;
'example' in this;
'example' in 'example';
'example' in 1;
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
Metadata
Assignees
Labels
No labels