Skip to content
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
@pchaigno

Description

@pchaigno

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 ({}) which requires to improve the current support for function and method definitions (to not mistake a function body for an object definition). Actually, that won't fix it 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions