This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Function call recognized as method definition #223
Closed
Description
This function call is recognized as a method definition:
write("){");
It even is in the tests since f579460 (the scopes shouldn't contain meta.method.js
).
@50Wliu Is it a mistake or was it placed here as a bug to fix?
This is happening since #134 which added support for this kind of method definitions:
var foo = {
baz() {}
};
I'm working on a fix. It will required to recognize JavaScript objects ( Actually, that won't fix it {}
) which requires to improve the current support for function and method definitions (to not mistake a function body for an object definition).and I found an other way :-)
EDIT: That probably should be a wontfix: I don't see how we can distinguish a function call from a method definition inside an object when there is "){"
in argument.