[Issue 14286] `alias this` not considered sub-typing in is() expression
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 22 19:35:07 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=14286
John Hall <john.michael.hall at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |john.michael.hall at gmail.com
--- Comment #1 from John Hall <john.michael.hall at 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");
}
--
More information about the Digitalmars-d-bugs
mailing list