-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable typeof "undefined" for general use #1446
Conversation
Can you please add the test from #1443 (comment) to see if it still performs correctly if function f(undefined) {
return function() {
var n = 1;
return typeof n == "undefined";
};
}
console.log( f(1)() ); It should be tested with and without |
9dae92a
to
1a556e7
Compare
@kzc added your test case (took liberty to remove In terms of code, |
Could you please add another test |
Regarding |
1a556e7
to
814d3d8
Compare
@kzc I missed the "with or" bit in your previous comment - sorry about that! As for |
Exactly. This has happened in the past. |
@kzc thanks for the explanation 👍 Is there anything else that needs testing and/or changing? If not, I shall remove |
} | ||
input: { | ||
function f(undefined) { | ||
return function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the superfluous inner function so that undefined
and var n
are in the same scope.
mangle = {} | ||
input: { | ||
function f(undefined) { | ||
return function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the superfluous inner function so that undefined
and var n
are in the same scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both tests should look like this:
function f(undefined) {
var n = 1;
return typeof n == "undefined";
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated both tests.
move out of unsafe, guard corner case with screw_id8 instead
814d3d8
to
022f285
Compare
LGTM |
Based on #1443 (comment)
/cc @kzc