summaryrefslogtreecommitdiff
path: root/test/files/run/t0936.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t0936.scala')
-rw-r--r--test/files/run/t0936.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/t0936.scala b/test/files/run/t0936.scala
new file mode 100644
index 0000000000..3a7535a5d8
--- /dev/null
+++ b/test/files/run/t0936.scala
@@ -0,0 +1,17 @@
+object Test extends Application {
+ def foo = {
+
+ abstract class MouseEventType { def x: String }
+ case object Clicked extends MouseEventType {
+ def x = "Clicked"
+ }
+
+ trait MouseHandler {
+ def mouseClicked() = handleEvent(Clicked);
+ def handleEvent(t : MouseEventType) = t.x
+ }
+ (new MouseHandler {}).handleEvent(Clicked)
+ }
+ assert(foo == "Clicked")
+}
+