I was playing around with dependent types and run into this error:
some.scala:17: error: class B needs to be abstract, since value element in trait
Buffer of type B.this.T is not defined
using this code:
package types
object Demo {
trait Buffer {
type T
val element: T
}
abstract class Wee extends Buffer {
type T <: Integer
val s = element - 2
}
class B extends Wee {
}
}
Could someone decrypt what value element stands for?