4105 – Stack overflow involving alias template parameters and undefined identifier

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4105 - Stack overflow involving alias template parameters and undefined identifier
Summary: Stack overflow involving alias template parameters and undefined identifier
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-invalid-code, patch
Depends on:
Blocks:
Reported: 2010年04月19日 17:45 UTC by Don
Modified: 2015年06月09日 01:27 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Don 2010年04月19日 17:45:42 UTC
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;
 }
Comment 1 Don 2010年05月05日 19:11:22 UTC
Fixed DMD2.044


AltStyle によって変換されたページ (->オリジナル) /