aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
Diffstat (limited to 'tests/neg')
-rw-r--r--tests/neg/i1992.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/neg/i1992.scala b/tests/neg/i1992.scala
new file mode 100644
index 000000000..818b46771
--- /dev/null
+++ b/tests/neg/i1992.scala
@@ -0,0 +1,9 @@
+object Test {
+ def main(args: Array[String]) = {
+ val x: Int => Unit =
+ y => println(x) // error: `x` is a forward reference
+ implicit val z: String => Unit =
+ y => println(implicitly[String => Unit]) // error: `z` is a forward reference
+ }
+}
+