Skip to content

Completion issue with reused variable name in different scope #2542

Closed
@frabbit

Description

class Test  {
  public static function main () {
    var x = [1,2,3];
    var r = x.map(function (x) return x+1); // here we use x again in different scope
    r.| // completion positon
  }
}

the compiler provides only Dynamic for completion at this position. If the function parameter name x is renamed to an unused variable like y everything works as expected.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions