When complaining about something, some compilers reproduce the offending lines. Usually this is not such a big deal, since you have a line number. In D, though, mixins mean that you don't have a line number. In this case, DMD should output the offending lines, since mixins are otherwise difficult to debug (the usual workaround is to output the value with a pragma, pipe to a file, and compile that for the actual error message, but that has mixed success).
I think you're probably talking about string mixins here? Summary edited to say that.
Yep we really need this.
Something seems to be outputted nowadays: ----- string get() { return "int x; int y; int z = x + b;"; } void main() { mixin(get()); } ----- test.d-mixin-13(15): Error: undefined identifier b The only problem is, where is "test.d-mixin-13"?
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/3bbb228f3f1239058e4451946554b174dd0a85e1 Fix issues 1870 and 12790: Write out string mixin code to a file for debugging purpose https://github.com/dlang/dmd/commit/34db7419c8bbf7487ecd8e7a4eb6adb6fc0bbb74 Merge pull request #8677 from thewilsonator/mixin-debug Fix issues 1870 and 12790: Write out string mixin code to a file for debugging purpose