We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b1d9162 + e0038b3 commit e0ef928Copy full SHA for e0ef928
tests/pos/overloaded_ho_fun.scala
@@ -1,7 +1,7 @@
1
import scala.math.Ordering
2
import scala.reflect.ClassTag
3
4
-trait Sam { def apply(x: Int): String }
+trait MonoSam { def apply(x: Int): String }
5
trait SamP[U] { def apply(x: Int): U }
6
7
class OverloadedFun[T](x: T) {
@@ -12,7 +12,7 @@ class OverloadedFun[T](x: T) {
12
def poly[U](f: Int => String): String = f(1)
13
def poly[U](f: Int => U): U = f(1)
14
15
-// def polySam[U](f: Sam): String = f(1) Only function types supported for pretype-args
+// def polySam[U](f: MonoSam): String = f(1) Only function types supported for pretype-args
16
// def polySam[U](f: SamP[U]): U = f(1)
17
18
// check that we properly instantiate java.util.function.Function's type param to String
0 commit comments