Bug 5878 – Forward reference in returning superclass from template using is() expression (Breaks std.traits.BaseTypeTuple)

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-04-24T00:47:00Z
Last change time
2013-11-22T01:39:53Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
kennytm
Blocks
340

Comments

Comment #0 by kennytm — 2011-04-24T00:47:15Z
Test case: ------------------------ template J(A) { static if (is(A P == super)) alias P J; } alias J!(A) Z; class X {} class A : X {} ------------------------ y.d(6): Error: forward reference to '(in X)' ------------------------ The template J is basically std.traits.BaseTypeTuple. Because of this bug, any use of BaseTypeTuple!A before A is defined (not just X) will result in a forward-reference bug.
Comment #1 by k.hara.pg — 2013-04-07T05:22:55Z
Comment #2 by github-bugzilla — 2013-04-08T16:37:54Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ae640c4414237fcb3edc14a664aa484a1a284257 fix Issue 5878 - Forward reference in returning superclass from template using is() expression https://github.com/D-Programming-Language/dmd/commit/94e608ad923eb33c0c7f8f05cea57fc50e73d169 Merge pull request #1859 from 9rnsr/fix5878 Issue 5878 - Forward reference in returning superclass from template using is() expression