HaxeCheckstyle / haxe-rename

A code renaming tool for Haxe
MIT License
17 stars 1 forks source link

Failing to rename simple public symbols #5

Closed dubspeed closed 1 month ago

dubspeed commented 3 months ago

👋 Hello,

in the example below, renaming "someValue" in DemoClassA does not reflect in its usage in the "WontRename" class.

package src;

class DemoClassA {
    public var someValue:String;
}

class SomeOtherClass {
    public function isEventFeatureFlag(aString:String):Bool {
        return false;
    }

    public function new() {}
}

class WontRename {
    var TESTRENAME:Bool = false;

    var _view:{
        isAssetsLoaded:Bool
    };
    var _someOtherClass:SomeOtherClass = new SomeOtherClass();

    function _onFeatureEnds(event:DemoClassA) {
        // misses a rename in the next line
        if (_view.isAssetsLoaded && _someOtherClass.isEventFeatureFlag(event.someValue) && TESTRENAME) {
            TESTRENAME = false;
        }
    }
}