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 693e81b + 1be7624 commit 64a239fCopy full SHA for 64a239f
docs/docs/reference/changed-features/overload-resolution.md
@@ -52,9 +52,10 @@ that the remaining parameters suffice for picking a variant of the overloaded fu
52
For example, the following code compiles in Dotty, while it results in an
53
missing parameter type error in Scala2:
54
```scala
55
-def f(x: Int, f: Int => Int) = f(x)
56
-def f(x: String, f: String => String) = f(x)
57
-f("a", _.length)
+def f(x: Int, f2: Int => Int) = f2(x)
+def f(x: String, f2: String => String) = f2(x)
+f("a", _.toUpperCase)
58
+f(2, _ * 2)
59
```
60
To make this work, the rules for overloading resolution in section 6.23.3 of the SLS are modified
61
as follows:
0 commit comments