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

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2009-05-20T07:07:00Z
Last change time
2014-04-18T09:12:05Z
Keywords
ice-on-valid-code, patch
Assigned to
bugzilla
Creator
rsinfu

Attachments

IDFilenameSummaryContent-TypeSize
376issue_tiargtuple.patchFix the problem (dmd 2.030)text/plain862

Comments

Comment #0 by rsinfu — 2009-05-20T07:07:51Z
Created attachment 376 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 by clugdbug — 2009-05-20T09:36:45Z
Also ICEs in the same place in DMD1.043. BTW - Great work!
Comment #2 by clugdbug — 2009-05-20T19:45:52Z
This patch also fixes bug 884. It doesn't fix 2884, though, which ICEs at the same place.
Comment #3 by bugzilla — 2009-07-09T02:50:19Z
Fixed dmd 1.046 and 2.031