Bug 7829 – __traits(isStaticFunction) fails for function in supertype
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-05T04:28:00Z
Last change time
2013-11-26T20:14:48Z
Keywords
pull
Assigned to
andrej.mitrovich
Creator
samukha
Comments
Comment #0 by samukha — 2012-04-05T04:28:01Z
Related to http://d.puremagic.com/issues/show_bug.cgi?id=7828
struct S
{
static void foo() {};
}
struct S2
{
S s;
alias s this;
}
static assert(__traits(isStaticFunction, S2.foo));
----
Error: static assert (__traits(isStaticFunction,s.foo)) is false
Comment #1 by andrej.mitrovich — 2013-01-08T12:44:47Z
This is true for all function trait types because they all use the same macro in the compiler. It will take a while to implement properly but it's doable.
Comment #2 by andrej.mitrovich — 2013-01-08T14:11:42Z