Bug 15597 – error messages in mixins should show context

Status
RESOLVED
Resolution
WORKSFORME
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-01-23T08:22:18Z
Last change time
2023-06-27T13:30:36Z
Assigned to
No Owner
Creator
Manu

Comments

Comment #0 by turkeyman — 2016-01-23T08:22:18Z
We need to find a better way of giving errors from mixins. For instance: icomponent.d-mixin-48(55): Error: found '<' when expecting ')' This tells me nothing, and to proceed I need to start adding pragma(msg, ...) in strategic places to try and discover what I'm actually dealing with. Suggest: Errors in mixins print a context to the error output, that is, the line of text the compiler is trying to compile, and perhaps even 1-2 lines before/after the context line if they look interesting.
Comment #1 by iamthewilsonator — 2021-03-21T13:46:49Z
This predates the fix for https://issues.dlang.org/show_bug.cgi?id=12790 in 2.084.0 does that solve this issue?