Bug 12143 – Base class is forward referenced

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-12T11:57:00Z
Last change time
2014-05-16T02:16:21Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
samukha

Comments

Comment #0 by samukha — 2014-02-12T11:57:08Z
class Node { alias typeof(true ? Node.init : Class.init) V; } class Type : Node { } class Class : Type { } void main() { } ---- bug.d(10): Error: class bug.Class base class is forward referenced by Node bug.d(10): Error: class bug.Class base class is forward referenced by Node bug.d(10): Error: class bug.Class base class is forward referenced by Object bug.d(10): Error: class bug.Class base class is forward referenced by Object bug.d(3): Error: incompatible types for ((null) : (null)): 'bug.Node' and 'bug.Class' This renders std.traits.CommonType unusable in certain situations.
Comment #1 by k.hara.pg — 2014-04-03T19:36:18Z
Comment #2 by github-bugzilla — 2014-05-16T02:16:17Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d73783b44738f97d2ae05c50bd6b804c6b8389ef fix Issue 12143 - Base class is forward referenced https://github.com/D-Programming-Language/dmd/commit/050707d1b1079bff15f3770fb6b5e8db1015a20a Merge pull request #3384 from 9rnsr/refactor_aggregate Issue 12078 & 12143 & 12555 & 11622 - Separate class hierarchy calculation from class member semantics