summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-11-04 13:40:46 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-11-04 13:40:46 +1000
commite35e107118814616e0cbf5609c95184b872d1f0f (patch)
tree77c17664a55347423e734413e5538aea7268eee2 /test
parentd1a76d5af7faa12ebebea0923812af26c40eebc9 (diff)
parentdd090168b75e32405662862246a0e36c3a979f8b (diff)
downloadscala-e35e107118814616e0cbf5609c95184b872d1f0f.tar.gz
scala-e35e107118814616e0cbf5609c95184b872d1f0f.tar.bz2
scala-e35e107118814616e0cbf5609c95184b872d1f0f.zip
Merge pull request #4072 from soc/SI-4950
SI-4950 Add tests, looks like it has been fixed earlier
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t4950.check9
-rw-r--r--test/files/run/t4950.scala12
2 files changed, 21 insertions, 0 deletions
diff --git a/test/files/run/t4950.check b/test/files/run/t4950.check
new file mode 100644
index 0000000000..3f3a302b62
--- /dev/null
+++ b/test/files/run/t4950.check
@@ -0,0 +1,9 @@
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala> val 1 = 2
+scala.MatchError: 2 (of class java.lang.Integer)
+
+scala> val List(1) = List(1)
+
+scala> :quit
diff --git a/test/files/run/t4950.scala b/test/files/run/t4950.scala
new file mode 100644
index 0000000000..cef06027bf
--- /dev/null
+++ b/test/files/run/t4950.scala
@@ -0,0 +1,12 @@
+import scala.tools.partest.ReplTest
+
+object Test extends ReplTest {
+ // Filter out the abbreviated stacktrace "... X elided"
+ // because the number seems to differ between versions/platforms/...
+ override def show = eval() filterNot (_ contains "elided") foreach println
+ def code =
+"""
+val 1 = 2
+val List(1) = List(1)
+"""
+}