Thread overview | ||||||
---|---|---|---|---|---|---|
|
March 22, 2018 [Issue 14286] `alias this` not considered sub-typing in is() expression | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14286 John Hall <john.michael.hall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |john.michael.hall@gmail.com --- Comment #1 from John Hall <john.michael.hall@gmail.com> --- The issue seems to be related to templated variables in alias this. Not an issue without templates. struct V { } struct S { V x; alias x this; } void main() { S a; static if(is(typeof(a) : V)) pragma(msg, "yep"); //prints "yep" else pragma(msg, "nope"); } -- |
March 23, 2018 [Issue 14286] `alias this` not considered sub-typing in is() expression | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14286 Simen Kjaeraas <simen.kjaras@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simen.kjaras@gmail.com --- Comment #2 from Simen Kjaeraas <simen.kjaras@gmail.com> --- Indeed. For clarification: the inner struct can be templated, the outer cannot: struct Inner1 {} struct Inner2() {} struct Outer1 { Inner1 a; alias a this; } struct Outer2 { Inner2!() a; alias a this; } struct Outer3() { Inner1 a; alias a this; } struct Outer4() { Inner2!() a; alias a this; } // Non-template outer struct: static assert( is(Outer1 : Inner1)); static assert( is(Outer2 : Inner2!())); // Templated outer struct: static assert(!is(Outer3 : Inner1)); static assert(!is(Outer4 : Inner2!())); -- |
December 17, 2022 [Issue 14286] `alias this` not considered sub-typing in is() expression | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14286 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P3 -- |
December 13 [Issue 14286] `alias this` not considered sub-typing in is() expression | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14286 --- Comment #3 from dlangBugzillaToGithub <robert.schadek@posteo.de> --- THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18958 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB -- |
Copyright © 1999-2021 by the D Language Foundation