Why it doesn't compile in D 2.0?
Don
nospam at nospam.com
Sun Jan 17 10:38:04 PST 2010
aarti_pl wrote:
>
> 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)
Workaround: It works in dmd2, svn 337 and later <g>.
More information about the Digitalmars-d-learn
mailing list