mirror of https://github.com/tc39/test262.git
Fix operator precedence (#754)
Unlike PHP, in JavaScript ! has higher precedence than instanceof, thus !smth instanceof TypeError will never (unless @@hasInstance is defined) be true.
This commit is contained in:
parent
29c2384449
commit
8fbe992e6e
|
@ -233,7 +233,7 @@ p.then(function () {
|
|||
|
||||
return "Expected exception to be thrown";
|
||||
}).then($DONE, function (e) {
|
||||
if (!e instanceof TypeError) {
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError but got " + e);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue