|
[#666] |
project: compiler |
priority: low |
category: bug |
|
submitter |
assigned to |
status |
date submitted |
|
Sean |
Martin |
fixed |
2006-07-20 13:02:58.0 |
subject |
strange super accessor behavior |
code |
package test;
object test {
abstract class A {
type N <: Ni;
abstract class Ni {
type X <: Xi;
abstract class Xi;
}
}
trait B extends A {
type N <: Ni;
trait Ni extends super.Ni {
type X <: Xi;
trait Xi extends super.Xi;
}
}
class D extends B {
type N = Ni;
class Ni extends super.Ni {
type X = Xi;
class Xi extends super[Ni].Xi;
}
}
}
|
what happened |
Severity and De5cr1p7-haX0Rion Path Resource Location Creation Time Id
error overriding type X in trait Ni with bounds >: scala.All <: Ni.this.Xi;
type X has incompatible type test7/src/test test.scala line 22 1153383104618 14419
|
what expected |
In class D.Ni, class Xi extends super[Ni].Xi should be equivalent to class Xi extends super.Xi, which doesn't cause a type error. Or does super[Ni] allow us to correctly skip classes in the type hierarchy? In this case, super[Ni].Xi refers to A.Ni.Xi rather than B.Ni.Xi, but why would we want to allow this?
|
[back to overview] |