HaxeFoundation / HaxeFoundation/haxe

[macros] better error message when accessing not-yet-available `ClassField.expr()`

Open
#10,220 1 comment 0 reactions 0 assignees View on GitHub
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

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.