Closed
Bug 394693
Opened 17 years ago
Closed 3 years ago
Add strict warning for "if (! p in o)" and "if (! a instanceof b)"
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
INVALID
People
(Reporter: jruderman, Unassigned)
References
Details
(Keywords: testcase)
js> var o = {}, p = "a"; if (! p in o) { print("no a in p") }; void 0
js> var o = {}, p = "a"; if (!(p in o)) { print("no a in p") }; void 0
no a in p
I think the first one should trigger a strict warning, to help avoid bugs like bug 382075. It rarely makes sense to have a boolean expression on the LHS of the "in" operator, and it never makes sense with the "instanceof" operator.
Updated•13 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Comment 1•3 years ago
|
||
No longer valid after bug 1619177.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•