Bug 6073 – Cannot pass __traits(parent, ...) as a template parameter if it is a module
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-05-29T03:57:00Z
Last change time
2011-09-21T13:31:17Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
kennytm
Comments
Comment #0 by kennytm — 2011-05-29T03:57:53Z
Test case:
--------------
module x;
struct S {}
template T(M...) {
alias int T;
}
alias T!x V; // ok
alias T!(__traits(parent, S)) U; // error
--------------
x.d(8): Error: expression module x is not a valid template value argument
x.d(8): Error: template instance x.T!(module x) error instantiating
--------------