View mode: basic / threaded / horizontal-split · Log in · Help
April 17, 2012
[Issue 7931] New: Error message with _error_ with var[1,2]
http://d.puremagic.com/issues/show_bug.cgi?id=7931

          Summary: Error message with _error_ with var[1,2]
          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-04-17 01:41:31 PDT ---
static assert( undefined[2, 4] == 2);

bug.d(9): Error: undefined identifier undefined
bug.d(9): Error: only one index allowed to index _error_


index ed4c6c6..de8498e 100644
--- a/src/expression.c
+++ b/src/expression.c
@@ -9382,6 +9382,8 @@ Expression *ArrayExp::semantic(Scope *sc)
#endif
    UnaExp::semantic(sc);
    e1 = resolveProperties(sc, e1);
+    if (e1->op == TOKerror)
+        return new ErrorExp();

    t1 = e1->type->toBasetype();
    if (t1->ty != Tclass && t1->ty != Tstruct)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 18, 2012
[Issue 7931] Error message with _error_ with var[1,2]
http://d.puremagic.com/issues/show_bug.cgi?id=7931



--- Comment #1 from github-bugzilla@puremagic.com 2012-04-17 20:37:55 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/b1f8d74893fa1d34095e82b5e040a100f6bce64d
fix Issue 7931 - Error message with _error_ with var[1,2]

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 18, 2012
[Issue 7931] Error message with _error_ with var[1,2]
http://d.puremagic.com/issues/show_bug.cgi?id=7931



--- Comment #2 from github-bugzilla@puremagic.com 2012-04-17 20:38:14 PDT ---
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/3b92cba684e1c9d03a54781bf60582e7d7e34b22
fix Issue 7931 - Error message with _error_ with var[1,2]

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 18, 2012
[Issue 7931] Error message with _error_ with var[1,2]
http://d.puremagic.com/issues/show_bug.cgi?id=7931


Walter Bright <bugzilla@digitalmars.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
            Status|NEW                         |RESOLVED
                CC|                            |bugzilla@digitalmars.com
        Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Top | Discussion index | About this forum | D home