HaxeFoundation / HaxeFoundation/haxe

Warning WInlineOptimizedField appear in some strange condition

Open
#11,675 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

I have a warning when working with VSCode, Projet [hashlink-debugger](https://github.com/vshaxe/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](https://github.com/HaxeFoundation/haxe/assets/22941109/a3515179-34a6-4936-a38c-aea3c2f97a58)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.