enhance conditionals (#3643)

This commit is contained in:
Alex Lam S.L
2019-12-22 04:29:32 +00:00
committed by GitHub
parent 519a00bd8a
commit 75aa6ef848
5 changed files with 120 additions and 33 deletions

View File

@@ -30,7 +30,7 @@ non_hoisted_function_after_return: {
}
expect: {
function foo(x) {
return x ? bar() : baz();
return (x ? bar : baz)();
function bar() { return 7 }
function baz() { return 8 }
}
@@ -181,7 +181,7 @@ non_hoisted_function_after_return_strict: {
expect: {
"use strict";
function foo(x) {
return x ? bar() : baz();
return (x ? bar : baz)();
function bar() { return 7 }
function baz() { return 8 }
}