[Issue 16529] New: string mixins break ifti

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Sep 23 09:28:31 PDT 2016


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

          Issue ID: 16529
           Summary: string mixins break ifti
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: john.loughran.colvin at gmail.com

template foo(T)
{
    mixin(`void foo(T t) {}`);
}

template bar(T)
{
    void bar(T t) {}
}

void main()
{
    foo(3); // fails
    // ifti.d(13): Error: template ifti.foo cannot deduce function from
argument types !()(int), candidates are:                                        
    // ifti.d(1):        ifti.foo(T)

    bar(3); // OK
}

--


More information about the Digitalmars-d-bugs mailing list