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 cd0abe9 commit d4e6c77Copy full SHA for d4e6c77
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