https://issues.dlang.org/show_bug.cgi?id=20764
Issue ID: 20764
Summary: [The D Bug Tracker] std.traits.isAggregateType chokes
on modules
Product: D
Version: D2
Hardware: All
URL: http://dlang.org/
OS: All
Status: NEW
Severity: enhancement
Priority: P3
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
It seems that you can throw just about anything at isAggregateType, but not a
module:
module test;
import std.traits;
pragma(msg, isAggregateType!test);
t.d(3): Error: template instance `isAggregateType!(test)` does not match
template declaration `isAggregateType(T)`
t.d(3): while evaluating `pragma(msg, isAggregateType!(test))`
Suggested fix: change the definition to:
enum isAggregateType(T...) =
is(T[0] == struct) || is(T[0] == union) || is(T[0] == class)
|| is(T[0] == interface);
--