deduplicate AST_Super & AST_This logic (#2366)

This commit is contained in:
Alex Lam S.L
2017-10-17 04:19:53 +08:00
committed by GitHub
parent a89f126db6
commit b6a7ca292e
4 changed files with 30 additions and 8 deletions

View File

@@ -631,3 +631,31 @@ issue_2271: {
}
expect_stdout: "PASS"
}
concise_method_with_super: {
options = {
arrows: true,
}
input: {
var o = {
f: "FAIL",
g() {
return super.f;
}
}
Object.setPrototypeOf(o, { f: "PASS" });
console.log(o.g());
}
expect: {
var o = {
f: "FAIL",
g() {
return super.f;
}
}
Object.setPrototypeOf(o, { f: "PASS" });
console.log(o.g());
}
expect_stdout: "PASS"
node_version: ">=4"
}