diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-09-04 00:08:42 -0700 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-09-04 00:08:42 -0700 |
commit | 350ec9547908f0692431370cb1510dcb769576ff (patch) | |
tree | 75b3e06d58ea27defccbdc5cab576ef5974891e8 /test/files/pos | |
parent | 4b9fdd340c47cb258223e1a68b560e2ddcffcb5d (diff) | |
parent | 27d61a2ef6c3059fd56a36fc18886fc53bb354a8 (diff) | |
download | scala-350ec9547908f0692431370cb1510dcb769576ff.tar.gz scala-350ec9547908f0692431370cb1510dcb769576ff.tar.bz2 scala-350ec9547908f0692431370cb1510dcb769576ff.zip |
Merge pull request #2899 from som-snytt/issue/4760-parser
SI-4760 Parser handles block-ending import
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t4760.scala | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/files/pos/t4760.scala b/test/files/pos/t4760.scala new file mode 100644 index 0000000000..767e3847f4 --- /dev/null +++ b/test/files/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._ + } +} |