DMD 2.055
Timon Gehr
timon.gehr at gmx.ch
Thu Sep 8 07:32:30 PDT 2011
On 09/08/2011 03:42 PM, Daniel Murphy wrote:
> This is http://d.puremagic.com/issues/show_bug.cgi?id=6352 and more
> generally http://d.puremagic.com/issues/show_bug.cgi?id=3180 . There is
> patch for 3180 that will hopefully be in the next release.
>
> "Joel Christensen"<joelcnz at gmail.com> wrote in message
> news:j49vki$2phd$1 at digitalmars.com...
>> On 08-Sep-11 8:46 PM, Joel Christensen wrote:
>>> I've got this program that does alters strings, but with D 2.055, it
>>> comes up with this error:
>>>
>>> Here is the code, I copied it from my program:
>>> http://p.baf.cc/3937
>>
>> Oops, accidently sent it prematurely.
>>
>> Here is the error:
>> \jpro\dpro2\verseprompt\section.d(249): Error: incompatible types for
>> ((__dgliteral1) ? (__dgliteral2)): 'string delegate(string text) pure' and
>> 'string delegate(string text) @system'
>>
>> - Joelcnz
>
>
Also note that that error message is really bad. CondExp could use a
incompatibleTypes() override, like eg. this one:
void CondExp::incompatibleTypes()
{
if (e1->type->toBasetype() != Type::terror &&
e2->type->toBasetype() != Type::terror
)
error("incompatible types for (%s ? %s : %s): '%s' and '%s'",
econd->toChars(), e1->toChars(), Token::toChars(op),
e2->toChars(),
e1->type->toChars(), e2->type->toChars());
}
More information about the Digitalmars-d-learn
mailing list