Issue 7829 - Function traits should be usable with subtyping #1445

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@ghost

ghost commented Jan 8, 2013

http://d.puremagic.com/issues/show_bug.cgi?id=7829

Perhaps this should also apply to some other traits, for now I've included only function traits.

@9rnsr

This comment has been minimized.

Show comment
Hide comment
@9rnsr

9rnsr Jan 21, 2013

Member

This change would not work if there are two or more level of alias this.

class C { int foo() {} alias n this; }
struct S1 { C c; alias c this; }
struct S2 { S1 s; alias s this; }
void main() { static assert(!__traits(isVirtualFunction, S2.foo)); }
Member

9rnsr commented Jan 21, 2013

This change would not work if there are two or more level of alias this.

class C { int foo() {} alias n this; }
struct S1 { C c; alias c this; }
struct S2 { S1 s; alias s this; }
void main() { static assert(!__traits(isVirtualFunction, S2.foo)); }

@ghost ghost closed this Jan 21, 2013

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment