D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 569 - Bogus forward reference error in template inside variadic template
Summary: Bogus forward reference error in template inside variadic template
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2006-11-18 20:42 UTC by Michael Arntzenius
Modified: 2014-02-15 13:21 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Michael Arntzenius 2006-11-18 20:42:09 UTC
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 Rainer Schuetze 2009-09-18 01:38:40 UTC
I could not reproduce this bug with DMD 1.047 and DMD 2.032.
Comment 2 Don 2009-09-18 15:07:14 UTC
Fixed long ago. Failed in 0.175, worked on DMD1.006. Still works.