[#1292] | project: compiler | priority: high | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Stephane | Martin | fixed | 2007-08-24 12:41:47.0 | |
subject | [contrib #764] Rules for typing seem to have changed | |||
code |
trait Foo[T <: Foo[T, Enum], Enum <: Enumeration] { type StV = Enum#Value type Meta = MegaFoo[T, Enum] type Slog <: Enumeration def getSingleton: Meta } trait MegaFoo[T <: Foo[T, Enum], Enum <: Enumeration] extends Foo[T, Enum] { def doSomething(what: T, misc: StV, dog: Meta#Event) = None abstract class Event object Event def stateEnumeration: Slog def se2: Enum } object E extends Enumeration { val A = Value val B = Value } class RFoo extends Foo[RFoo, E.type] { def getSingleton = MegaRFoo type Slog = E.type } object MegaRFoo extends RFoo with MegaFoo[RFoo, E.type] { def stateEnumeration = E def se2 = E } |
|||
what happened | bad.scala:31: error: error overriding method stateEnumeration in trait MegaFoo of type => MegaRFoo.this.Slog; method stateEnumeration has incompatible type => object E def stateEnumeration = E ^ bad.scala:32: error: error overriding method se2 in trait MegaFoo of type => E.type; method se2 has incompatible type => object E def se2 = E ^ two errors found |
|||
what expected | Clean Compile | |||
[back to overview] |
Stephane edited on 2007-08-24 12:42:22.0 |
Change needs to be documented ! |
Martin edited on 2007-08-27 14:32:21.0 |
It was a compiler bug, after all. |