[#282] | project: compiler | priority: medium | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Matthias | Martin | fixed | 2004-01-23 17:31:41.0 | |
subject | Illegal cyclic inheritance error | |||
code |
trait Algebra { trait Abel: a { def +(that: a): a; } type a <: Abel; } object MyAlgebra extends Algebra { type a = Expr; trait Expr extends Abel { def +(that: Expr): Expr = that; } } |
|||
what happened | Yields the following exception:T.scala:10: illegal cyclic reference involving type a trait Expr extends Abel { ^ |
|||
what expected | No error. BTW, if the type alias and the trait definition in MyAlgebra are swapped, then the compiler runs without complaints. | |||
[back to overview] |
Martin edited on 2004-04-20 14:12:36.0 |