summaryrefslogtreecommitdiff
path: root/test-nsc/files/pos/thistype.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test-nsc/files/pos/thistype.scala')
-rwxr-xr-xtest-nsc/files/pos/thistype.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/test-nsc/files/pos/thistype.scala b/test-nsc/files/pos/thistype.scala
new file mode 100755
index 0000000000..8c0ba209be
--- /dev/null
+++ b/test-nsc/files/pos/thistype.scala
@@ -0,0 +1,14 @@
+object Test {
+
+ class Ctl {
+ def enable: this.type = { System.out.println("enable"); this }
+ }
+
+ class MouseCtl extends Ctl {
+ def mouseDown(x: int, y: int): unit = { System.out.println("mouse down"); }
+ }
+
+ def main(args: Array[String]) =
+ new MouseCtl().enable.mouseDown(1, 2);
+
+}