Bug 4033 – Error: base class is forward referenced

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
All
Creation time
2010-03-31T01:55:00Z
Last change time
2014-02-15T02:19:36Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
nfxjfg
Blocks
340

Attachments

IDFilenameSummaryContent-TypeSize
846bug4033.diffPatch to fix bug 4033text/plain683

Comments

Comment #0 by nfxjfg — 2010-03-31T01:55:29Z
$ dmd t2.d t2.d(13): Error: class t2.Z base class is forward referenced by X t2.d(7): Error: static assert (is(Z : X)) is false t2.d(11): instantiated from here: Template!(Z) $ cat t2.d module t2; class X { } class Template(T) { static assert(is(T : X)); //line 7 } alias Template!(Z) Bla; //line 11 class Z : X { //line 13 }
Comment #1 by robert — 2010-12-09T09:27:45Z
*** Issue 5336 has been marked as a duplicate of this issue. ***
Comment #2 by robert — 2010-12-09T09:29:54Z
Created attachment 846 Patch to fix bug 4033 The patch passes the test suite and is against revision 795. Should fix the bug for both D1 and D2.
Comment #3 by clugdbug — 2011-03-01T17:14:31Z