Bug 805 – regression: forward reference when using templated classes

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2007-01-06T15:46:28Z
Last change time
2019-05-16T09:08:49Z
Keywords
rejects-valid
Assigned to
Walter Bright
Creator
Thomas Kühne
Blocks
340

Comments

Comment #0 by thomas-dloop — 2007-01-06T15:46:28Z
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 by thomas-dloop — 2007-01-07T10:19:11Z
*** Bug 811 has been marked as a duplicate of this bug. ***
Comment #2 by clugdbug — 2009-09-14T08:27:30Z
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 by razvan.nitu1305 — 2019-05-16T09:08:49Z
The code now compiles in D2, closing as fixed.