Thread overview
[Issue 7420] New: Duplicate "cannot be read at compile time" error messages
Feb 01, 2012
Don
Feb 05, 2013
Andrej Mitrovic
February 01, 2012
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: nobody@puremagic.com
        ReportedBy: clugdbug@yahoo.com.au


--- Comment #0 from Don <clugdbug@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: -------
November 10, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7420



--- Comment #1 from github-bugzilla@puremagic.com 2012-11-10 06:46:40 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/550c25d09939a031727d9ae0731477db31e3980f Fixes Issue 7420 - Return ErrorExp on error to avoid duplicate errors.

Force 32bit diagnostics for test-case.

https://github.com/D-Programming-Language/dmd/commit/81585953effd2beebdac7bf6be49f4379403b7f3 Merge pull request #1200 from AndrejMitrovic/Fix7420

Fix Issue 7420 - Duplicate "cannot be read at compile time" error messages

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 05, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7420


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------