Thread overview | |||||
---|---|---|---|---|---|
|
August 16, 2020 [Issue 21165] Spurious @nogc error with delegate taking `immutable size_t` | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21165 ag0aep6g <ag0aep6g@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid CC| |ag0aep6g@gmail.com --- Comment #1 from ag0aep6g <ag0aep6g@gmail.com> --- (In reply to andy.pj.hanson from comment #0) > f((int, immutable size_t) { > int y = x; > }); [...] > * The delegate parameters are named, as in `f((int a, immutable size_t b) {`. Note that the second parameter is actually already named in the non-working version. It's called "size_t". What's missing is the type. By adding "b", size_t gets recognized as the type as intended. Slightly more reduced test case: ---- @nogc: void main() { int x = 0; f((int, b) { int y = x; }); } void f(T)(scope void delegate(T, immutable int) @nogc cb) {} ---- Also happens with other qualifiers (const, shared) instead of immutable. -- |
December 17, 2022 [Issue 21165] Spurious @nogc error with delegate taking `immutable size_t` | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21165 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P3 -- |
December 13 [Issue 21165] Spurious @nogc error with delegate taking `immutable size_t` | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21165 --- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> --- THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19773 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB -- |
Copyright © 1999-2021 by the D Language Foundation