Aladdin - Scala Bugtracking
[#1231] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Adriaan Adriaan fixed 2007-07-19 18:30:27.0
subject erroneously overriding abstract higher-kinded type member with type member of kind * is not detected
code
// reported by Vladimir Reshetnikov on 19 July 2007
trait A {
 type T[_]
}

trait B // First-order type

class C extends A {
 type T = B // This compiles well (@M: ... but it shouldn't)
}
what happened
no error
what expected
tcpoly_override.scala:9: error: The kind of type T does not conform to the expected kind of type T[_] in trait A.
C.this.T's type parameters do not match type T's expected parameters: type T (in class C) has no type parameters, but type T (in trait A) has one
 type T = B // This compiles well (@M: ... but it shouldn't)
      ^
one error found
[back to overview]
Changes of this bug report