opUnary overloading

cal callumenator at gmail.com
Sun Aug 26 14:03:05 PDT 2012


On Sunday, 26 August 2012 at 20:54:35 UTC, Timon Gehr wrote:
> Also see:
> http://d.puremagic.com/issues/show_bug.cgi?id=8307
>
> I assume the compiler fails to add an implicit conversion node 
> into the
> AST because at the point where -i is returned, the return type 
> is still
> assumed to be 'int'. What you are observing is not type 
> coercion, but
> an x87 FPU stack underflow.

"If there are multiple ReturnStatements, the types of them must 
match exactly."

Understood, I wasn't doing this.


More information about the Digitalmars-d-learn mailing list