[Issue 2841] New: char[] template value arguments broken in D2
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Apr 16 02:18:06 PDT 2009
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: bugzilla at digitalmars.com
ReportedBy: clugdbug at 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;
}
--
More information about the Digitalmars-d-bugs
mailing list