[Issue 572] New: syntax error when using template instantiation with typeof
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 19 00:17:04 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=572
Summary: syntax error when using template instantiation with
typeof
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: lovesyao at hotmail.com
class Test{
static const test2=1;
template test(){
const int test=1;
}
}
void main(){
auto a=new Test;
static assert(typeof(a).test2==1);//ok
alias typeof(a) t;
static assert(t.test!()==1);//ok
static assert(typeof(a).test!()==1);//syntax error
}
--
More information about the Digitalmars-d-bugs
mailing list