You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Macros being opaque for the purpose of diagnostics is somewhat intentional, as this allows programs to e.g. define custom macros that report the span of the call site instead of the macro itself (which would not be terribly useful), see for example: https://play.alumina-lang.net/?code=929c1ff2e347fad9
I think it would be useful to provide this additional context in the form of "stack trace" like it is done during monomorphization, but currently once AST is constructed, each AST node has just one (or none) source span attached.
I think diagnostics in general leaves a lot to be desired - I'll leave this issue open, but probably it'll be a while before I get to it.
The following snippet fails to compile, and the diagnostic references an incorrect line number for the error:
The error I get:
In this case,
src/main:6:5
is not where the actual error is, but insrc/main:3:9
. This can be confusing, especially when other macros call each other.produces:
It would be nice to either:
Compilation Info
Revision:
8a621ba34ccf041bf963b46ad25f9756d43650b8
The text was updated successfully, but these errors were encountered: