haikuwebkit/LayoutTests/js/script-tests/dfg-strict-mode-to-this.js

15 lines
378 B
JavaScript

description("Tests that doing to-this conversion in strict mode doesn't cause us to believe that if the input is an object then the output is also an object.");
function thingy() {
"use strict";
function bar() {
return this instanceof Object;
}
function foo() {
return bar();
}
return foo();
}
dfgShouldBe(thingy, "thingy()", "false");