[Issue 18439] Error: cannot use operator ~= in @nogc delegate 'main.test.__lambda1'
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 27 07:07:06 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18439
--- Comment #4 from Seb <greensunny12 at gmail.com> ---
I looked a bit at this and there seem to be two issues going on:
1) DMD creates the __lambda1 member
For this in @nogc main case (i.e. without label), TypeFunction.isnogc = false
-> initInferAttributes tries to infer the attributes of the lambdas and infers
it to be not @nogc
For this @nogc: main case (i.e. with the label), TypeFunction.isnogc = true
-> setGC returns true -> failure on CatAssign
2) The __lambda1 uses a CatAssign (probably from CTFE?) and that's checked even
though it never makes it to the codegen.
--
More information about the Digitalmars-d-bugs
mailing list