Closed
Description
This compiles without error:
import scala.language.higherKinds
trait Base {
type Rep[T]
}
trait BaseExp extends Base {
type Rep[T] = Exp[T]
case class Exp[T](v: T)
}
The next trait compiles with an error (which feels inadequate and the source location is lost during reporting):
trait BaseStr extends Base {
type Rep[T] = String
}
error: right-hand side of parameterized alias type must refer to a class
one error found
The next trait compiles with the same error (though I guess it is by design here and the source location is preserved):
trait BaseDirect extends Base {
type Rep[T] = T
}
error: right-hand side of parameterized alias type must refer to a class
type Rep[T] = T
^
one error found
All these traits compile fine with Scala 2.10.3.
Metadata
Metadata
Assignees
Labels
No labels