http://d.puremagic.com/issues/show_bug.cgi?id=4711
Summary: Incorrect handling of && operator with void operand
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Ersin Er <[email protected]> 2010-08-22 02:51:37 PDT ---
The following code compiles and outputs "1 = 1" as expected when executed:
1 == 1 && writeln("1 = 1");
However, the following code fails to compile (although it should not):
1 == 2 && writeln("1 = 2");
The compiler error is as follows:
Error: integral constant must be scalar type, not void
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------