summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-02-28 20:52:52 +0000
committerPaul Phillips <paulp@improving.org>2011-02-28 20:52:52 +0000
commit34719ee9cb51650550cfcf849178cf5da5a93dd5 (patch)
tree3d637db46a205aec5f2a8c766b69337c30ba325e /test/files
parentfce8415e570bedbc4e62b6049ad94737b56c8699 (diff)
downloadscala-34719ee9cb51650550cfcf849178cf5da5a93dd5.tar.gz
scala-34719ee9cb51650550cfcf849178cf5da5a93dd5.tar.bz2
scala-34719ee9cb51650550cfcf849178cf5da5a93dd5.zip
Test case closes #3613, no review.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/bug3613.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/bug3613.scala b/test/files/run/bug3613.scala
new file mode 100644
index 0000000000..3763093d30
--- /dev/null
+++ b/test/files/run/bug3613.scala
@@ -0,0 +1,22 @@
+class Boopy {
+ private val s = new Schnuck
+ def observer : PartialFunction[ Any, Unit ] = s.observer
+
+ private class Schnuck extends javax.swing.AbstractListModel {
+ model =>
+ val observer : PartialFunction[ Any, Unit ] = {
+ case "Boopy" => fireIntervalAdded( model, 0, 1 )
+ }
+ def getSize = 0
+ def getElementAt( idx: Int ) : AnyRef = "egal"
+ }
+
+}
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ val x = new Boopy
+ val o = x.observer
+ o( "Boopy" ) // --> throws runtime error
+ }
+}