Very strange compilation error

Nils Boßung via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Oct 15 14:28:03 PDT 2014


On Wednesday 15 October 2014 22:13, John Colvin wrote:

> On Wednesday, 15 October 2014 at 19:29:27 UTC, Jack Applegame
> wrote:
>> I don't understand why this code doesn't compile:
>>
>> http://dpaste.dzfl.pl/dfd8df7f80ad
> 
> that should be immutable(ubyte)[] not immutable ubyte[] which is
> equivalent to immutable(ubyte[]). You can't overwrite immutable
> data, hence the error.

Then

  Foo1 foo1; foo1 = Foo1(); // compiles

shouldn't compile either.



More information about the Digitalmars-d-learn mailing list