HaxeCheckstyle / haxe-rename

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

Array Comprehension with [for] crashes the parser #9

Closed dubspeed closed 1 month ago

dubspeed commented 3 months ago

👋 Hello,

Sorry for the issue spam, this for loop somehow crashes the rename-parser as well:

class CrashInForLoop {
    final _vo = {posts:[]};

    inline final function updatePosts() {
        var posts = [for (vo in _vo.posts) (new A(vo)) ];
    }
}

Error message: failed to parse src/ForLoopCrash.hx - Exception: failed to parse src/ForLoopCrash.hx - Exception: Cannot read properties of null (reading 'uses')\n" + "Called from module TypeError: Cannot read properties of null (reading 'uses')\n" "Called from refactor_discover_UsageCollector.readForIteration (haxe-rename-symbol-examples/rename.js line 4703 column 14)\n