[Issue 15597] New: error messages in mixins should show context

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jan 23 00:22:18 PST 2016


https://issues.dlang.org/show_bug.cgi?id=15597

          Issue ID: 15597
           Summary: error messages in mixins should show context
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: turkeyman at gmail.com

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.

--


More information about the Digitalmars-d-bugs mailing list