Bug 1821 – ICE when using __traits isSame on const/invariant variables

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-02-08T11:31:00Z
Last change time
2015-06-09T01:14:30Z
Keywords
ice-on-valid-code
Assigned to
bugzilla
Creator
gide

Comments

Comment #0 by gide — 2008-02-08T11:31:55Z
import std.stdio; int a; const int b; enum { int c = 0 }; invariant int d = 0; void main() { writefln(__traits(isSame, a, a)); // Ok writefln(__traits(isSame, b, b)); // CRASH writefln(__traits(isSame, c, c)); // CRASH writefln(__traits(isSame, d, d)); // CRASH }
Comment #1 by bugzilla — 2008-03-07T00:28:14Z
Fixed dmd 2.012