Specifying @nogc on structs seems to have no effect
drug
drug2004 at bk.ru
Tue Sep 19 13:49:18 UTC 2017
19.09.2017 16:48, drug пишет:
> 19.09.2017 16:46, Craig Black пишет:
>> class Foo
>> {
>> }
>>
>> struct MyStruct
>> {
>> @nogc:
>> public:
>> Foo foo; // This does not produce an error, but it still requires a
>> GC scan
>> void Bar()
>> {
>> foo = new Foo; // This produces an error
>> }
>> }
>
> it produces an error for me https://run.dlang.io/is/PbZE5i
sorry, wrong link, this one
https://run.dlang.io/is/UwTCXu
More information about the Digitalmars-d
mailing list