[Issue 15804] New: missing UDAs on nested struct template
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Mar 17 00:28:37 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15804
Issue ID: 15804
Summary: missing UDAs on nested struct template
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: epi at atari8.info
Code:
@(42) struct Foo(D) {}
auto fooFac(T)()
{
pragma(msg, __traits(getAttributes, Foo));
return Foo!T();
}
auto booFac(T)()
{
@(43) struct Boo {}
pragma(msg, __traits(getAttributes, Boo));
return Boo();
}
auto barFac(T)()
{
@(44) struct Bar(D) {}
pragma(msg, __traits(getAttributes, Bar));
return Bar!T();
}
auto bazFac(T)()
{
@(45) static struct Baz(D) {}
pragma(msg, __traits(getAttributes, Baz));
return Baz!T();
}
void main()
{
auto foo = fooFac!int;
auto boo = booFac!int;
auto bar = barFac!int;
auto baz = bazFac!int;
}
Compilation produces:
tuple(42)
tuple(43)
tuple()
tuple()
Expected:
tuple(42)
tuple(43)
tuple(44)
tuple(45)
--
More information about the Digitalmars-d-bugs
mailing list