You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The below code shows a compiler flaw in that the wildcard "_" as value for a bounded type parameter either breaks the bound - as it result in Any - or doesn't (as id hoped it to be) evaluates to the bound.
classSomeClass(valintValue:Int)
classMyClass[T<:SomeClass](valmyValue:T)
defmyMethod(i:MyClass[_]) {
i.myValue.intValue/2// << error i.myValue is of type Any
}
defmyMethod(i:MyClass[_ <:SomeClass]) {
i.myValue.intValue/2// << works
}