[Issue 752] Assertion failure: 'e->type->ty != Ttuple' on line 4518 in file 'mtype.c'

Walter Bright newshound at digitalmars.com
Fri Dec 29 20:39:20 PST 2006


Sean Kelly wrote:
> d-bugmail at puremagic.com wrote:
>>
>> ------- Comment #2 from bugzilla at digitalmars.com  2006-12-29 21:43 
>> -------
>> The statement:
>>
>>         mixin .Tuple!((TList[1 .. $]))
>>
>> is actually invalid, as it attempts to make a tuple of tuples. Instead,
>>
>>         mixin .Tuple!(TList[1 .. $])
>>
>> is correct.
> 
> This seems a slim distinction.  Adding a set of parenthesis makes the 
> code invalid?

Sure, in the same way that:

	int foo( (int, char) );

is not valid. Unless a compelling use case appears for the extra parens, 
I'd prefer to disallow it.

>  > This is also wrong:
>>
>>         Tuple!(int, long) T;
>>         T val;
>>
>> as T is not declared as being a type.
> 
> Yup, I'm aware of this.  The code actually has a few bugs in it.  But it 
> still shouldn't cause an assertion failure in the compiler.

Right. That's why I haven't marked it resolved yet <g>.


More information about the Digitalmars-d-bugs mailing list