I'm trying to define a generic class that takes a parameterized type T and then use the type in an Array definition in the class. I wrote the following which I thought seemed like it should work
class MyClass[T] {
val myarr:Array[T] = new Array[T](10)
}
But the compiler complains with the following
- can't find the class manifest for element type T
- value newArray is not a member of Null
Anyone know whats going on here and what its not happy about?