HaxeFoundation / HaxeFoundation/haxe
[macros] better error message when accessing not-yet-available `ClassField.expr()`
Open
error-reporting
platform-macro
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Currently if we don't respect the build order in macros and try to match on `ClassField.expr()` return value for a field that is not yet built, we'll get a rather cryptic `Uncaught exception field access on null`, since the `expr()` method would return `null`.
Could we instead throw a "field not ready" error on `expr()` invokation?
Contributor guide
Assessment
This issue has not been assessed yet.