summaryrefslogtreecommitdiff
path: root/test-nsc/files/pos/thistype.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2005-10-06 13:14:33 +0000
committerMartin Odersky <odersky@gmail.com>2005-10-06 13:14:33 +0000
commit25a98964b5109aa55b71a8a26886c59903193548 (patch)
tree84b8fa154b5a0a2f36accd43d8d35926f6ba8579 /test-nsc/files/pos/thistype.scala
parent3b81e0cbac2fe51226472949ecde4d81b0e95412 (diff)
downloadscala-25a98964b5109aa55b71a8a26886c59903193548.tar.gz
scala-25a98964b5109aa55b71a8a26886c59903193548.tar.bz2
scala-25a98964b5109aa55b71a8a26886c59903193548.zip
*** empty log message ***
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);
+
+}