Commit c41f5f2d authored by marja's avatar marja Committed by Commit bot

[parser] Add more tests for preparser variable tracking.

BUG=v8:5501

Review-Url: https://codereview.chromium.org/2661233002
Cr-Commit-Position: refs/heads/master@{#42819}
parent 5f68b54d
......@@ -8781,6 +8781,18 @@ TEST(NoPessimisticContextAllocation) {
{"", "var {my_var : a} = {my_var};", true},
{"", "let {my_var : a} = {my_var};", true},
{"", "const {my_var : a} = {my_var};", true},
{"", "var [a, b = my_var] = [1, 2];", true},
{"", "var [a, b = my_var] = [1, 2]; my_var;", true},
{"", "let [a, b = my_var] = [1, 2];", true},
{"", "let [a, b = my_var] = [1, 2]; my_var;", true},
{"", "const [a, b = my_var] = [1, 2];", true},
{"", "const [a, b = my_var] = [1, 2]; my_var;", true},
{"", "var {a = my_var} = {}", true},
{"", "var {a: b = my_var} = {}", true},
{"", "let {a = my_var} = {}", true},
{"", "let {a: b = my_var} = {}", true},
{"", "const {a = my_var} = {}", true},
{"", "const {a: b = my_var} = {}", true},
{"a = my_var", "", true},
{"", "function inner2(a = my_var) { }", true},
{"", "(a = my_var) => { }", true},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment