[Issue 4711] New: Incorrect handling of && operator with void operand
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 22 02:51:41 PDT 2010
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: nobody at puremagic.com
ReportedBy: ersin.er at gmail.com
--- Comment #0 from Ersin Er <ersin.er at gmail.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list