www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7420] New: Duplicate "cannot be read at compile time" error messages

reply d-bugmail puremagic.com writes:
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



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: -------
Feb 01 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7420




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


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: -------
Nov 10 2012
prev sibling parent d-bugmail puremagic.com writes:
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: -------
Feb 05 2013