http://d.puremagic.com/issues/show_bug.cgi?id=2841

           Summary: char[] template value arguments broken in D2
           Product: D
           Version: 2.027
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: bugzi...@digitalmars.com
        ReportedBy: clugd...@yahoo.com.au


int foo(char[] c)() { return 0; }

void main(){
        int a = foo!("abc")();
}
---
fog.d(6): Error: template fog.foo(char[] c) does not match any function
template
 declaration
fog.d(6): Error: template fog.foo(char[] c) cannot deduce template function
from
 argument types !("abc")()
fog.d(6): Error: template instance errors instantiating template

This all works in D1.042. Fails in D2.028.
The code below is similar. Also for class and union.
--
struct C(char[] c){ }

void main(){
   C!("abc") a;
}


-- 

Reply via email to