static foreach over constant range in @nogc block

tspike email at gamedevgp.net
Sat Oct 3 14:02:08 UTC 2020


On Saturday, 3 October 2020 at 12:43:01 UTC, Timon Gehr wrote:
>
> It's a compiler bug, the same as this one:
>
> @nogc:
> void main(){
>     static immutable x = { int[] a; a~=1; return a; }();
> }

Ah, thank you for the quick reply! Do you know if this bug has 
already been reported?


More information about the Digitalmars-d-learn mailing list