[Issue 12261] [REG2.066a] alias T cannot bind to templated type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 26 00:33:52 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12261



--- Comment #4 from Kenji Hara <k.hara.pg at gmail.com> 2014-02-26 00:33:49 PST ---
(In reply to comment #3)
> Introduced in https://github.com/D-Programming-Language/dmd/pull/3210.
> 
> Looking at that pull's testcases, this might be an intentional change - (T) is
> more specialized than (alias T), as all types can be aliases but not all
> aliases are types.

Yes, the current behavior has practical benefit that:

template isAliasable(alias T) { pragma(msg, T); }
template isAliasable(T)       { pragma(msg, T); }
struct A1(T) {}
struct A2{}
alias a1 = isAliasable!(const A1!double);
alias a2 = isAliasable!(const A2);

With 2.065:
A1!double
A2
--> type qualifier information has lost

With 2.066a:
const(A1!double)
const(A2)
--> accessible to the full information

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list