3014 – ICE(template.c) instantiating template with tuple

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3014 - ICE(template.c) instantiating template with tuple
Summary: ICE(template.c) instantiating template with tuple
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 All
: P2 normal
Assignee: Walter Bright
URL:
Keywords: ice-on-valid-code, patch
Depends on:
Blocks:
Reported: 2009年05月20日 07:07 UTC by Shin Fujishiro
Modified: 2014年04月18日 09:12 UTC (History)
1 user (show)

See Also:


Attachments
Fix the problem (dmd 2.030) (862 bytes, patch)
2009年05月20日 07:07 UTC, Shin Fujishiro
Details | Diff
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 Shin Fujishiro 2009年05月20日 07:07:51 UTC
Created attachment 376 [details] 
Fix the problem (dmd 2.030)
TemplateInstance::semanticTiargs() does not expand tuples which are passed as expressions (e.g. TypeExp). As a result, this valid code causes an ICE:
--------------------
import std.typetuple;
template List(lst...) { alias lst list; }
alias TypeTuple!(List!(void)) A;
alias TypeTuple!(A[0].list) B;
--------------------
ta = 39, (int)
assert template.c(4088) global.errors
--------------------
Comment 1 Don 2009年05月20日 09:36:45 UTC
Also ICEs in the same place in DMD1.043.
BTW - Great work!
Comment 2 Don 2009年05月20日 19:45:52 UTC
This patch also fixes bug 884. It doesn't fix 2884, though, which ICEs at the same place.
Comment 3 Walter Bright 2009年07月09日 02:50:19 UTC
Fixed dmd 1.046 and 2.031


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