Skip to content

Commit 07951c3

Browse files
committed
Move neg case of typeApply
1 parent 6cf4ee9 commit 07951c3

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
object typeApply:
2+
3+
def f3[T <: Int][U <: String](): T => T = ???
4+
def f5[T <: Int][U <: String]: [X <: Unit] => X => X = ???
5+
def f7[T <: Int][U <: String]()[X <: Unit]: X => X = ???
6+
7+
@main def test = {
8+
f3[String] //error
9+
f5[Int][Unit] // error
10+
f7[String]()[Unit] // error
11+
}

tests/pos/_typeInterweaving/typeApply.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ object typeApply:
1010
def f7[T <: Int][U <: String]()[X <: Unit]: X => X = ???
1111

1212
@main def test = {
13-
f0[Int][String] //only one that works when lines 1088 to 1089 of Applications.scala are uncommented
13+
f0[Int][String]
1414
f1[Int][String]
1515
f2[Int][String]()
1616
f3[Int][String]()
1717
f4[Int][String]
1818
f5[Int][String]
19-
f5[Int][Unit] // Should this work ?
2019
f5[Int][String][Unit]
2120
f6[Int]()[Unit]
2221
f7[Int]()[Unit]

0 commit comments

Comments
 (0)