Skip to content

Commit 36b0020

Browse files
committed
Update the test to include a custom function1 type
1 parent f321a35 commit 36b0020

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/run/i24573.check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
3
44
42
55
hello
6+
world

tests/run/i24573.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ trait Con2[-T] extends (T => Int):
77
trait Con3[+R] extends (() => R):
88
def apply(): R
99

10+
trait F1[-T, +R] {
11+
def apply(t: T): R
12+
}
13+
14+
trait SF[-T] extends F1[T, Unit] { def apply(t: T): Unit }
15+
1016
object Test:
1117
def main(args: Array[String]): Unit =
1218
val f1: (Int => Unit) = i => println(i)
@@ -23,3 +29,6 @@ object Test:
2329

2430
val c4: Con3[Unit] = () => println("hello")
2531
c4()
32+
33+
val f5: SF[String] = s => println(s)
34+
f5("world")

0 commit comments

Comments
 (0)