Skip to content

[Bug] Renaming function is dangerously broken #2982

Open
@neuronix

Description

@neuronix

Latest development build, AS3.

Two problems:

  1. Renaming a method does not limit it's scope to the target class. If classes A and B both have a same method name, remaing the method in A impacts class B's methods as well.
  2. Renaming does not parse the whole project.

Input

public class A {
  function myFunction() { 
  
  }
}

public class B {
  function myFunction() { [Right click, rename to myFunctionNewName]
    var a:A = new A();
    a.myFunction();
  }
}

Output

public class A {
  function myFunctionNewName() { [ NOTE: Incorrect modification ]
  
  }
}

public class B {
  function myFunctionNewName() {
    var a:A = new A();
    a.myFunction(); [ NOTE : Omitted modification ]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions