Bug 4711 – Incorrect handling of && operator with void operand

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2010-08-22T02:51:00Z
Last change time
2011-12-28T10:26:06Z
Keywords
rejects-valid
Assigned to
nobody
Creator
ersin.er

Comments

Comment #0 by ersin.er — 2010-08-22T02:51:37Z
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
Comment #1 by braddr — 2011-02-06T15:40:27Z
Mass migration of bugs marked as x86-64 to just x86. The platform run on isn't what's relevant, it's if the app is a 32 or 64 bit app.
Comment #2 by bugzilla — 2011-12-28T10:26:06Z