diff options
author | attila <none@none> | 2014-09-08 18:40:58 +0200 |
---|---|---|
committer | attila <none@none> | 2014-09-08 18:40:58 +0200 |
commit | e45562799c4272641b85e1fe3e80fe5110610bf9 (patch) | |
tree | b9cef6239cf6401c1d53e6ae1e70dacbd0055dc9 /test | |
parent | 9414a2351ab0fd02d2ba08eada0c45d45e635288 (diff) |
8057148: Skip nested functions on reparse
Reviewed-by: hannesw, lagergren
Diffstat (limited to 'test')
-rw-r--r-- | test/script/basic/optimistic_check_type.js | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/test/script/basic/optimistic_check_type.js b/test/script/basic/optimistic_check_type.js index d2b50a4c..67e27c22 100644 --- a/test/script/basic/optimistic_check_type.js +++ b/test/script/basic/optimistic_check_type.js @@ -36,13 +36,18 @@ var trees = new Array("redwood", "bay", "cedar", "oak"); // Testing conditional operator print(inspect("" ? b : x.a, "ternary operator")) -print(inspect(x.b ? b : x.a, "ternary operator")) -print(inspect(c ? b : a, "ternary operator")) -print(inspect(!c ? b : a, "ternary operator")) -print(inspect(d ? b : x.c, "ternary operator")) +var b1 = b; +print(inspect(x.b ? b1 : x.a, "ternary operator")) +var b2 = b; +print(inspect(c ? b2 : a, "ternary operator")) +var b3 = b; +print(inspect(!c ? b3 : a, "ternary operator")) +var b4 = b; +print(inspect(d ? b4 : x.c, "ternary operator")) print(inspect(x.c ? a : c, "ternary operator")) print(inspect(c ? d : a, "ternary operator")) -print(inspect(c ? +a : b, "ternary operator")) +var b5 = b; +print(inspect(c ? +a : b5, "ternary operator")) // Testing format methods print(inspect(b.toFixed(2), "global double toFixed()")) @@ -53,11 +58,14 @@ print(inspect(b.toExponential(2), "global double toExponential()")) print(inspect(trees[1], "member object")) trees[1] = undefined; print(inspect(trees[1], "member undefined")) -print(inspect(1 in trees ? b : a, "conditional on array member")) +var b6=b; +print(inspect(1 in trees ? b6 : a, "conditional on array member")) delete trees[2] -print(inspect(2 in trees ? b : a, "conditional on array member")) +var b7=b; +print(inspect(2 in trees ? b7 : a, "conditional on array member")) print(inspect(3 in trees ? trees[2]="bay" : a, "conditional on array member")) -print(inspect("oak" in trees ? b : a, "conditional on array member")) +var b8=b; +print(inspect("oak" in trees ? b8 : a, "conditional on array member")) // Testing nested functions and return value function f1() { |