File tree 1 file changed +21
-0
lines changed 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ object unboundWildcard {
2
+
3
+ // TODO: move this to tests/neg once it doesn't crash the compiler anymore
4
+ val wildcardVal : _ = 0 // error: unbound wildcard type
5
+
6
+ val annotated : _ @ unchecked = 0 // error: unbound wildcard type
7
+
8
+ def wildcardArg (x : _): Int = 0 // error: unbound wildcard type
9
+
10
+ def wildcardResult (x : Int ): _ = 0 // error: unbound wildcard type
11
+
12
+ val singletonTuple : (((((((_))))))) = ??? // error: unbound wildcard type
13
+
14
+ val wildcardBoundedTypeArgL : List [_ <: _] = List (0 ) // error: unbound wildcard type
15
+ val wildcardBoundedTypeArgU : List [_ >: _] = List (0 ) // error: unbound wildcard type
16
+
17
+ def wildcardBoundedTypeParamL [T <: _](x : T ): T = x // error: unbound wildcard type
18
+ def wildcardBoundedTypeParamU [T >: _](x : T ): T = x // error: unbound wildcard type
19
+
20
+ val _1403 : (_ <: Any ) = 1 // error: unbound wildcard type
21
+ }
You can’t perform that action at this time.
0 commit comments