Possible Duplicate:
Scala: Abstract Types vs Generics
The way I understand it, the following two class definitions are the same. So what is the difference, other than the syntax?
abstract class Container[T] {}
class IntContainer extends Container[Int] {}
abstract class Container2 { type T }
class IntContainer2 extends Container2 { type T = Int }
When I look at the decompiled byte code, I notice that the first set still have generics (although IntContainer is defined as having type Object: public class IntContainer extends Container<Object>
). The second set has no such information. I thought all generic types were erased anyway...
PS Using Scala 2.10-M5