diff options
Diffstat (limited to 'tests/neg/i1992.scala')
-rw-r--r-- | tests/neg/i1992.scala | 9 |
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 + } +} + |