blob: b137c2664925ac76a1a49f9442cd61c82f51f581 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
object unboundWildcard {
val wildcardVal: _ = 0 // error: unbound wildcard type
val annotated: _ @unchecked = 0 // error: unbound wildcard type
def wildcardArg(x: _): Int = 0 // error: unbound wildcard type
def wildcardResult(x: Int): _ = 0 // error: unbound wildcard type
val singletonTuple: (((((((_))))))) = ??? // error: unbound wildcard type
val wildcardBoundedTypeArgL: List[_ <: _] = List(0) // error: unbound wildcard type
val wildcardBoundedTypeArgU: List[_ >: _] = List(0) // error: unbound wildcard type
def wildcardBoundedTypeParamL[T <: _](x: T): T = x // error: unbound wildcard type
def wildcardBoundedTypeParamU[T >: _](x: T): T = x // error: unbound wildcard type
val _1403: (_ <: Any) = 1 // error: unbound wildcard type
}
|