Thread overview | |||||
---|---|---|---|---|---|
|
December 12, 2020 [Issue 21475] template 'this' parameter is incorrectly handled for 'alias this' | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21475 --- Comment #1 from Max Samukha <maxsamukha@gmail.com> --- (In reply to Max Samukha from comment #0) > struct S { > string rt; > void _init(this T)() { > rt = T); > } > } > > struct S2 { > S s; > alias s this; > } > > void main() { > S2 s2; > s2._init; > assert(s2.rt == "S2"); > } > > T is incorrectly resolved to S, while it should be typeof(s2), which is S2. Corrected test case: struct S { string rt; void _init(this T)() { rt = __traits(identifier, T); } } struct S2 { S s; alias s this; } void main() { S2 s2; s2._init; assert(s2.rt == "S2"); } -- |
December 17, 2022 [Issue 21475] template 'this' parameter is incorrectly handled for 'alias this' | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21475 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P3 -- |
December 13 [Issue 21475] template 'this' parameter is incorrectly handled for 'alias this' | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21475 --- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> --- THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19839 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB -- |
Copyright © 1999-2021 by the D Language Foundation