Thread overview
[Issue 2887] Wrong line number reported inside string mixin
Feb 03, 2018
Seb
Dec 17, 2022
Iain Buclaw
February 03, 2018
https://issues.dlang.org/show_bug.cgi?id=2887

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12@gmail.com
            Version|D1 (retired)                |D2

--- Comment #3 from Seb <greensunny12@gmail.com> ---
Changing this to D2 as it's still not working as expected:

---
template line()
{
        const char[] line = "__LINE__";
}
template wrongLine()
{
        const char[] wrongLine = "\n\n\n\n\n__LINE__";
}
void main()
{
    import std.stdio;
        writefln("Line: %s, %s, %s", __LINE__, mixin(line!()),
mixin(wrongLine!()));
        writefln("Line: %s, %s, %s", __LINE__, mixin(line!()),
mixin(wrongLine!()));
}
---


https://run.dlang.io/is/uZrbxu

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=2887

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3

--
December 13
https://issues.dlang.org/show_bug.cgi?id=2887

--- Comment #4 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/17973

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--