This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
Named arguments that are reserved ES6 keywords cannot be destructured #392
Closed
Description
Right now we rename variables only. With destructuring of args (#180), looks like we would hit issues with reserved keywords:
main() {
void f({delete, function}) {
print("delete: $delete");
print("function: $function");
}
f(delete: 1, function: 2);
}
Would give some syntax-error-full code:
function main() {
function f({delete = null, function = null} = {}) {
core.print(`delete: ${delete}`);
core.print(`function: ${function}`);
}
f({delete: 1, function: 2});
}
(note: compiler currently works fine, issues are only with destructuring of named args)
Metadata
Metadata
Assignees
Labels
No labels