summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-10-16 22:09:12 +0000
committerPaul Phillips <paulp@improving.org>2010-10-16 22:09:12 +0000
commit080d357a3e3c88c17626c3a2ddd6fc334cb86d2e (patch)
treebe1b3394dd07957e97654c152947205302f9058b /test
parent5cdb213d7d24ae357c518823e1054cb302b250eb (diff)
downloadscala-080d357a3e3c88c17626c3a2ddd6fc334cb86d2e.tar.gz
scala-080d357a3e3c88c17626c3a2ddd6fc334cb86d2e.tar.bz2
scala-080d357a3e3c88c17626c3a2ddd6fc334cb86d2e.zip
Made some changes to fjbg so when people run in...
Made some changes to fjbg so when people run into #1133 at least it will tell them what method was the cause. The fact that ten files are touched in this commit instead of one or two is a testament to the wonder of checked exceptions. No review.
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/bug1133msg.check4
-rw-r--r--test/files/neg/bug1133msg.scala33
2 files changed, 37 insertions, 0 deletions
diff --git a/test/files/neg/bug1133msg.check b/test/files/neg/bug1133msg.check
new file mode 100644
index 0000000000..5b499ef12f
--- /dev/null
+++ b/test/files/neg/bug1133msg.check
@@ -0,0 +1,4 @@
+bug1133msg.scala:1: error: cannot emit bytecode for Match$.badMethod: offset too big to fit in 16 bits: 53273
+object Match {
+ ^
+one error found
diff --git a/test/files/neg/bug1133msg.scala b/test/files/neg/bug1133msg.scala
new file mode 100644
index 0000000000..b4a29aff4d
--- /dev/null
+++ b/test/files/neg/bug1133msg.scala
@@ -0,0 +1,33 @@
+object Match {
+ def someMethod = 5
+
+ def badMethod(s: String) = s match {
+ case Extractor1(Extractor2(Extractor3("dog", "dog", "dog"), x2, x3), b, c, Extractor3("b", "b", f), e) => println(e)
+ case Extractor3(Extractor2(Extractor1("a", "aa", "aaa", "aa", "a"), Extractor2("a", "aa", "aaa"), e), y, z) => println(e)
+ case Extractor2(Extractor3("a", "a", x), Extractor3("b", "b", y), Extractor3("c", "c", z)) => println(z)
+ case _ => println("fail")
+ }
+
+ def someOtherMethod = 10
+
+ object Extractor1 {
+ def unapply(x: Any) = x match {
+ case x: String => Some(x, x+x, x+x+x, x+x, x)
+ case _ => None
+ }
+ }
+
+ object Extractor2 {
+ def unapply(x: Any) = x match {
+ case x: String => Some(x, x+x, x+x+x)
+ case _ => None
+ }
+ }
+
+ object Extractor3 {
+ def unapply(x: Any) = x match {
+ case x: String => Some(x, x, x)
+ case _ => None
+ }
+ }
+}