[Issue 12900] REG 2.065: Wrong code in IfStatement condition Expression

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jun 13 00:25:26 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12900

--- Comment #4 from Iain Buclaw <ibuclaw at gdcproject.org> ---
If there's a way to distinguish between different kinds of type in dmd's
backend, you could throw in some tree checking.

Such as:
Assignments, left and right types are compatible.
Comparisons, left and right types are compatible.
Returns, return value type and function return type are compatible.
Conditions, condition is a scalar type.

Of course, you don't need this sort of checking in dmd release builds. :)

--


More information about the Digitalmars-d-bugs mailing list