haxe-rename icon indicating copy to clipboard operation
haxe-rename copied to clipboard

Array Comprehension with [for] crashes the parser

Open dubspeed opened this issue 6 months ago • 0 comments

👋 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

dubspeed avatar Aug 01 '24 09:08 dubspeed