Bug 2435 – ICE when undefined type used in tuple function declaration

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2008-10-31T05:42:00Z
Last change time
2014-03-01T00:36:25Z
Keywords
ice-on-invalid-code
Assigned to
bugzilla
Creator
samukha

Comments

Comment #0 by samukha — 2008-10-31T05:42:48Z
Foo foo(A...)() { } enum a = foo!(1, 2)();
Comment #1 by clugdbug — 2009-01-09T09:14:03Z
Actually applies to D1 as well. Here's a slightly simplified test case: Foo foo(A...)() { } static assert(foo!(1, 2)()); -------- On DMD2: Assertion failure: 'i < parameters->dim' on line 784 in file 'template.c' On DMD1, it segfaults. If there is only one parameter is passed to the tuple, it works correctly, producing the error: bug.d(1): Error: identifier 'Foo' is not defined And another example shows that it's not the return value, it's any parameter: -------- int foo(A...)(Foo x) { } static assert(foo!(1,2)());
Comment #2 by samukha — 2009-01-09T10:05:42Z
Comment #3 by dsimcha — 2009-01-09T14:20:24Z
*** This bug has been marked as a duplicate of 2229 ***