http://d.puremagic.com/issues/show_bug.cgi?id=7420
Summary: Duplicate "cannot be read at compile time" error messages Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: clugd...@yahoo.com.au --- Comment #0 from Don <clugd...@yahoo.com.au> 2012-02-01 11:50:11 PST --- int x = 2; char[] y = "abc".dup; static assert(x < 4); static assert(y == "abc"); static assert(cast(ubyte[])y != null); static assert(y[0] == 1); static assert(y[0..1].length == 1); ----- BEFORE PATCH --- crash.d(405): Error: variable x cannot be read at compile time crash.d(405): Error: variable x cannot be read at compile time crash.d(405): while evaluating: static assert(x < 4) crash.d(406): Error: variable y cannot be read at compile time crash.d(406): Error: variable y cannot be read at compile time crash.d(406): while evaluating: static assert(y == "abc") crash.d(407): Error: variable y cannot be read at compile time crash.d(407): Error: variable y cannot be read at compile time crash.d(407): while evaluating: static assert(cast(ubyte[])y != null) crash.d(408): Error: variable y cannot be read at compile time crash.d(408): Error: variable y cannot be read at compile time crash.d(408): while evaluating: static assert(cast(int)y[0u] == 1) crash.d(409): Error: variable y cannot be read at compile time crash.d(409): Error: variable y cannot be read at compile time crash.d(409): while evaluating: static assert(y[0u..1u].length == 1u) ---- AFTER PATCH --- crash.d(405): Error: variable x cannot be read at compile time crash.d(405): while evaluating: static assert(x < 4) crash.d(406): Error: variable y cannot be read at compile time crash.d(406): while evaluating: static assert(y == "abc") crash.d(407): Error: variable y cannot be read at compile time crash.d(407): while evaluating: static assert(cast(ubyte[])y != null) crash.d(408): Error: variable y cannot be read at compile time crash.d(408): while evaluating: static assert(cast(int)y[0u] == 1) crash.d(409): Error: variable y cannot be read at compile time crash.d(409): while evaluating: static assert(y[0u..1u].length == 1u) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------