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.
1 parent 27804de commit 70cf4a5Copy full SHA for 70cf4a5
tests/run/i9507.scala
@@ -0,0 +1,6 @@
1
+extension (x: Int)
2
+ def add(y: Int): Int = x + y
3
+
4
+def newFunction: Int => Int = 4.add
5
6
+@main def Test = assert(newFunction(1) == 5)
0 commit comments