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 639e52a commit 9da23ecCopy full SHA for 9da23ec
test/files/pos/t9178.flags
@@ -0,0 +1 @@
1
+-Xfatal-warnings -deprecation
test/files/pos/t9178.scala
@@ -0,0 +1,13 @@
+// eta expansion to Function0 is problematic (as shown here).
2
+// Perhaps we should we deprecate it? See discussion in the comments of
3
+// on SI-9178.
4
+//
5
+// This test encodes the status quo: no deprecation.
6
+object Test {
7
+ def foo(): () => String = () => ""
8
+ val f: () => Any = foo
9
+
10
+ def main(args: Array[String]): Unit = {
11
+ println(f()) // <function0>
12
+ }
13
+}
0 commit comments