From 9ef5f6817688f814a3450126aa7383b0928e80a0 Mon Sep 17 00:00:00 2001 From: Samuel Gruetter Date: Wed, 12 Mar 2014 22:44:33 +0100 Subject: add tests from scala/test/files/{pos,neg} with explicit Unit return type --- tests/untried/pos/t4760.scala | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/untried/pos/t4760.scala (limited to 'tests/untried/pos/t4760.scala') diff --git a/tests/untried/pos/t4760.scala b/tests/untried/pos/t4760.scala new file mode 100644 index 000000000..d4407a86b --- /dev/null +++ b/tests/untried/pos/t4760.scala @@ -0,0 +1,34 @@ + +class Test { + // parses + def f1 = { + import scala._; + } + // b.scala:7: error: ';' expected but '}' found. + // } + // ^ + // one error found + def f2 = { + import scala._ + } + def f2b = { + import scala.collection.mutable.{ Map => MMap } + } + def f(): Unit = { + locally { + import scala.util.Properties.lineSeparator + } + } + + // parses + def f3 = { + import scala._ + 5 + } + locally { (x: Int) => + import scala.util._ + } + 1 match { + case 1 => import scala.concurrent._ + } +} -- cgit v1.2.3