File tree 3 files changed +17
-6
lines changed
3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ trait D { type M >: B }
5
5
6
6
object Test {
7
7
def test (x : C with D ): Unit = {
8
- def f (y : x.M )(z : y.L [y.L ]) = z // error: y.L takes type parameters
9
- f(new B { type L [F [_]] = F [F ] })(1 ) // error: F takes type parameters (follow-on-error)
8
+ def f (y : x.M )(z : y.L [y.L ]) = z // error: y.L has wrong kind
9
+ f(new B { type L [F [_]] = F [F ] })(1 ) // error: F has wrong kind
10
10
}
11
11
12
12
type LB [F [_]]
@@ -17,8 +17,8 @@ object Test {
17
17
foo[Int ]() // an error would be raised later, during PostTyper.
18
18
19
19
def bar [X , Y ]() = ()
20
- bar[List , Int ]() // error: List takes type parameters
20
+ bar[List , Int ]() // error: List has wrong kind
21
21
22
- bar[Y = List , X = Int ]() // error: List takes type parameters
22
+ bar[Y = List , X = Int ]() // error: List has wrong kind
23
23
24
24
}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ trait D { type M >: B }
5
5
6
6
object Test {
7
7
def test (x : C with D ): Unit = {
8
- def f (y : x.M )(z : y.L [y.L ]) = z // error: y.L takes type parameters
9
- f(new B { type L [F [_[_]]] = F [F ] })(1 ) // error: F takes type parameters
8
+ def f (y : x.M )(z : y.L [y.L ]) = z // error: y.L has wrong kind
9
+ f(new B { type L [F [_[_]]] = F [F ] })(1 ) // error: F has wrong kind
10
10
}
11
11
}
Original file line number Diff line number Diff line change
1
+ trait A { type L [X [_]] }
2
+ trait B { type L }
3
+ trait C { type M <: A }
4
+ trait D { type M >: B }
5
+
6
+ object Test {
7
+ def test (x : D with C ): Unit = {
8
+ def f (y : x.M )(z : y.L [y.L ]) = z // error: y.L has wrong kind
9
+ new B { type L [F [_[_]]] = F [F ] } // error: F has wrong kind
10
+ }
11
+ }
You can’t perform that action at this time.
0 commit comments