www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15597] New: error messages in mixins should show context

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 puremagic.com
          Reporter: turkeyman 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.

--
Jan 23 2016