D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 805 - regression: forward reference when using templated classes
Summary: regression: forward reference when using templated classes
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: All All
: P3 normal
Assignee: Walter Bright
URL:
Keywords: rejects-valid
: 811 (view as issue list)
Depends on:
Blocks: 340
  Show dependency treegraph
 
Reported: 2007-01-06 15:46 UTC by Thomas Kühne
Modified: 2019-05-16 09:08 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Thomas Kühne 2007-01-06 15:46:28 UTC
http://dstress.kuehne.cn/run/c/class_22_B.d
run/c/class_22_B.d(13): class dstress.run.c.class_22_B.T!().B has forward 
references

http://dstress.kuehne.cn/run/t/this_10_A.d
run/t/this_10_A.d(15): class dstress.run.t.this_10_A.T!().B has forward 
references
Comment 1 Thomas Kühne 2007-01-07 10:19:11 UTC
*** Bug 811 has been marked as a duplicate of this bug. ***
Comment 2 Don 2009-09-14 08:27:30 UTC
I don't think is a regression. It ICEd on DMD 0.175 (25 Nov 2006):

Assertion failure: '!scope' on line 195 in file 'toobj.c'

The current behaviour was present in DMD1.000 (2 Jan 2007). So I think it changed from ice-on-valid-code into rejects-valid.
Original test case:

template FFF()
{
 class A : B { }
 class B { }
}

void main()
{
 mixin FFF;
}
Comment 3 RazvanN 2019-05-16 09:08:49 UTC
The code now compiles in D2, closing as fixed.