Can't assign to static array in ctor?

bearophile bearophileHUGS at lycos.com
Mon Apr 9 12:42:25 PDT 2012


H. S. Teoh:

> 	struct S {
> 		const(int)[4] data;
> 		this(const(int)[4] d) {
> 			data = d;	// this is line 4
> 		}
> 	}
>
> 	void main() {
> 		S s;
> 	}

I think this used to work (do you have an older DMD to verify 
it?). So maybe this is regression.

Bye,
bearophile


More information about the Digitalmars-d mailing list