|
[#670] |
project: compiler |
priority: low |
category: missing feature |
|
submitter |
assigned to |
status |
date submitted |
|
Sean |
Martin |
won't fix |
2006-07-21 15:02:36.0 |
subject |
No way to disambiguate same name super classes in same name nested classes |
code |
package test;
abstract class A {
type N <: Ni;
trait Ni {
type X <: Xi;
trait Xi;
}
}
trait B extends A {
type N <: Ni;
trait Ni extends super.Ni {
type X <: Xi;
trait Xi extends super.Xi;
type B_Xi = Xi;
}
}
trait C extends A {
type N <: Ni;
trait Ni extends super.Ni {
type X <: Xi;
trait Xi extends super.Xi;
type C_Xi = Xi;
}
}
class D extends B with C {
type N = Ni;
class Ni extends super[B].Ni with super[C].Ni {
type X = Xi;
trait Xi extends super[B].Xi with super[C].Xi;
}
}
|
what happened |
Severity and De5cr1p7-haX0Rion Path Resource Location Creation Time Id
C does not name a base class of class Ni test9/src/test Test.scala line 29 1153467772898 15190
B does not name a base class of class Ni test9/src/test Test.scala line 29 1153467772898 15189
|
what expected |
There should be some way to distinguish between different Xi super classes. As a hack, I can use type aliases (extends super.B_Xi with super.C_Xi). Would prefer for the above code to compile (use B and C to distinguish between different B.Ni and C.Ni super classes).
|
[back to overview] |