Why it doesn't compile in D 2.0?

aarti_pl aarti at interia.pl
Sat Jan 16 03:05:05 PST 2010


class Test {
     string t1 = "test";		//Ok!
     char[] t2 = "test".dup;	//Compile error
}

void main(char[][] args) {
}

Error:
hello.d(3): Error: cannot evaluate _adDupT((& 
D12TypeInfo_Aya6__initZ),"test") at compile time
hello.d(3): Error: cannot evaluate _adDupT((& 
D12TypeInfo_Aya6__initZ),"test") at compile time

Is there workaround?

BR
Marcin Kuszczak
(aarti_pl)


More information about the Digitalmars-d-learn mailing list