www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15993] New: using mixin to specify 2 arguments for writefln

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

          Issue ID: 15993
           Summary: using mixin to specify 2 arguments for writefln
                    results in unrecognized behavior
           Product: D
           Version: D2
          Hardware: x86
               URL: http://dlang.org/phobos/
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P3
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: yosikawa altalk.com

following code throws.

string foo() {
    return `123,"foo"`;
}
void main() {
    writefln("%d %s", mixin(foo()));
}

object.Exception Incorrect format specifier for range: %d at
C:\APP\D\dmd2\windows\bin\..\..\src\phobos\std\format.d(2489)

DMD32 D Compiler v2.071.0

--
May 05 2016