[Issue 1211] New: mixin("__LINE__")

BCS ao at pathlink.com
Thu May 3 12:05:15 PDT 2007


Reply to d-bugmail at puremagic.com,

> http://d.puremagic.com/issues/show_bug.cgi?id=1211
> 
> Summary: mixin("__LINE__")
> Product: D
> Version: 1.010
> Platform: Other
> OS/Version: Windows
> Status: NEW
> Severity: normal
> Priority: P2
> Component: DMD
> AssignedTo: bugzilla at digitalmars.com
> ReportedBy: rueschi at giquadrat.de
> import std.stdio;
> void main() { writefln("%d", mixin("__LINE__")); }
> Expected output: 2
> Actual output: 1 (everywhere)

Well what would you expect? There is more than one option.

writef("%\n", mixin(string)); // 1, 3 or 4? what about generated strings?
const char[] string = " 


__LINE__";


how about a dotted form?

<mixin_line>.<line_in_mixin>




More information about the Digitalmars-d-bugs mailing list