www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4105] New: Stack overflow involving alias template parameters and undefined identifier

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4105

           Summary: Stack overflow involving alias template parameters and
                    undefined identifier
           Product: D
           Version: 2.040
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-invalid-code, patch
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: clugdbug yahoo.com.au


--- Comment #0 from Don <clugdbug yahoo.com.au> 2010-04-19 17:45:42 PDT ---
template Bug4105a(alias Storage)
{
    enum bool somerubbish = Bug4105b!(Storage).nonexistent;
}

struct Bug4105b(alias Storage){
    enum bool useless = Bug4105a!(Storage).somerubbish;
}

static assert(Bug4105b!(0)().foo);
--------

PATCH: expression.c DotIdExp::semantic line 6055.

       else if (ident == Id::stringof)
        {   char *s = ie->toChars();
            e = new StringExp(loc, s, strlen(s), 'c');
            e = e->semantic(sc);
            return e;
        }
        error("undefined identifier %s", toChars());
+        return new ErrorExp();
-        type = Type::tvoid;
-        return this;
    }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 19 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4105


Don <clugdbug yahoo.com.au> changed:

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


--- Comment #1 from Don <clugdbug yahoo.com.au> 2010-05-05 19:11:22 PDT ---
Fixed DMD2.044

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