[Issue 4105] New: Stack overflow involving alias template parameters and undefined identifier

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 19 17:45:43 PDT 2010


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 at puremagic.com
        ReportedBy: clugdbug at yahoo.com.au


--- Comment #0 from Don <clugdbug at 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: -------


More information about the Digitalmars-d-bugs mailing list