Bug 569 – Bogus forward reference error in template inside variadic template

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-11-18T20:42:00Z
Last change time
2014-02-15T13:21:55Z
Keywords
rejects-valid
Assigned to
nobody
Creator
daekharel

Comments

Comment #0 by daekharel — 2006-11-18T20:42:09Z
import std.stdio; template Test(A ...) { template Test(B) { void Test(A a, B b) { writefln(a, b); } } } void main() { alias Test!(char[], int) Temp; alias Temp!(float) T; } -------------- Compiling the above code produces: "Error: error: forward reference of B". B is quite obviously not forward-referenced in the code.
Comment #1 by r.sagitario — 2009-09-18T01:38:40Z
I could not reproduce this bug with DMD 1.047 and DMD 2.032.
Comment #2 by clugdbug — 2009-09-18T15:07:14Z
Fixed long ago. Failed in 0.175, worked on DMD1.006. Still works.