File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
compiler/test-resources/repl Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ scala> object Foo1 { type T[+A] = (A, Int) }
2
+ // defined object Foo1
3
+ scala> object Foo2 { type T[+A] = [+B] => (A, B) }
4
+ // defined object Foo2
5
+ scala> object Foo3 { type T[+A] = [+B] => [C] => (A, B) }
6
+ // defined object Foo3
7
+ scala> ((1, 2): Foo1.T[Int]): Foo1.T[Any]
8
+ val res0: (Any, Int) = (1,2)
9
+ scala> ((1, 2): Foo2.T[Int][Int]): Foo2.T[Any][Int]
10
+ val res1: (Any, Int) = (1,2)
11
+ scala> (1, 2): Foo3.T[Int][Int]
12
+ 1 | (1, 2): Foo3.T[Int][Int]
13
+ | ^^^^^^^^^^^^^^^^
14
+ | Missing type parameter for Foo3.T[Int][Int]
15
+ scala> ((1, 2): Foo3.T[Int][Int][Int]): Foo3.T[Any][Int][Int]
16
+ val res2: (Any, Int) = (1,2)
17
+ scala> object Foo3 { type T[A] = [B] => [C] => (A, B) }
18
+ // defined object Foo3
19
+ scala> ((1, 2): Foo3.T[Int][Int][Int])
20
+ val res3: (Int, Int) = (1,2)
21
+ scala> ((1, 2): Foo3.T[Int][Int][Int])
22
+ val res4: (Int, Int) = (1,2)
You can’t perform that action at this time.
0 commit comments