Why is this?
Manu via Digitalmars-d
digitalmars-d at puremagic.com
Tue Sep 6 05:31:02 PDT 2016
On 6 September 2016 at 21:28, Timon Gehr via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On 06.09.2016 08:07, Manu via Digitalmars-d wrote:
>>
>> I have weird thing:
>>
>> template E(F){
>> enum E {
>> K = F(1)
>> }
>> }
>>
>> struct S(F = float, alias e_ = E!double.K) {}
>> S!float x; // Error: E!double.K is used as a type
>>
>> alias T = E!double.K;
>> struct S2(F = float, alias e_ = T) {}
>> S2!float y; // alias makes it okay...
>>
>> struct S3(F = float, alias e_ = (E!double.K)) {}
>> S3!float z; // just putting parens make it okay as well... wat!?
>>
>>
>> This can't be right... right?
>>
>> No problem if E is not a template.
>>
>
> Bug.
https://issues.dlang.org/show_bug.cgi?id=16472
More information about the Digitalmars-d
mailing list