HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.03k stars 648 forks source link

Warning WInlineOptimizedField appear in some strange condition #11675

Open yuxiaomao opened 1 month ago

yuxiaomao commented 1 month ago

I have a warning when working with VSCode, Projet hashlink-debugger master, hld/Eval.hx, lastest haxe (it's a recent bug as I could not reproduce with 547b510).

The warning says "Inlining of cached field getName might lead to unexpected output (WInlineOptimizedField)", where getName is a function from EnumValueTools.

The warning does not appear when I just open the project, I always need to wait a while (such as after some minutes browsing the web). The warning appear when I click+ctrl something (e.g. Value) and jump to another file, then return to it. After a ctrl+shift+B (build), it will either disappear or give more warning on other files (seems depend on opened file). After the warning appear, restart language server and rebuild will remove all warning.

image

Simn commented 4 weeks ago

@kLabz Can you think of any commit since https://github.com/HaxeFoundation/haxe/commit/547b510e177f68c4e2f9ca8861e06142a312c2ba that could be related here? I just browsed through them and don't see anything obviously related, so I'm wondering if this is actually the case.

kLabz commented 3 weeks ago

Well, the display request optimizations come to mind, but that doesn't sound like the real issue (more like what makes the issue visible, like some other hxb issues).

I suppose this is triggered by diagnostics ?