Why type specialization is defined differently than is expression type specialization ?

deadalnix deadalnix at gmail.com
Wed Jun 27 14:35:50 PDT 2012


Le 27/06/2012 22:35, Steven Schveighoffer a écrit :
> On Wed, 27 Jun 2012 16:32:33 -0400, Roman D. Boiko <rb at d-coding.com> wrote:
>
>> On Wednesday, 27 June 2012 at 20:27:39 UTC, Steven Schveighoffer wrote:
>>> On Wed, 27 Jun 2012 16:16:53 -0400, Roman D. Boiko <rb at d-coding.com>
>>> wrote:
>>>>> TypeSpecialization:
>>>>>
>>>>> Type struct union class interface enum function delegate super
>>>>> const immutable inout shared return
>>>
>>> This is only valid for is( Type == TypeSpecialization)
>>
>> No, unless the D specification is outdated.
>>
>> IsExpression:
>> is ( Type )
>> is ( Type : TypeSpecialization )
>> is ( Type == TypeSpecialization )
>> ...
>
> It's poorly written, TypeSpecialization is restricted for the : case.
> Maybe it passes the parser, but fails on semantic.
>
> "TypeSpecialization is only allowed to be a Type." -- context for
> is(Type : TypeSpecialization)
>
> -Steve

OK, I had misunderstood here too.

This whole is stuff is kind of messed up.


More information about the Digitalmars-d mailing list