D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6073 - Cannot pass __traits(parent, ...) as a template parameter if it is a module
Summary: Cannot pass __traits(parent, ...) as a template parameter if it is a module
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 minor
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
Depends on:
Blocks:
 
Reported: 2011-05-29 03:57 UTC by kennytm
Modified: 2011-09-21 13:31 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description kennytm 2011-05-29 03:57:53 UTC
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
--------------