summaryrefslogtreecommitdiff
path: root/test/files/pos/thistype.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2003-09-02 17:27:57 +0000
committerMartin Odersky <odersky@gmail.com>2003-09-02 17:27:57 +0000
commitd8a3d0acaa3ff4bae5a20ff64d265754e7c1fbe5 (patch)
treeb22dd299335625f6970d2374dda2001e66cc755e /test/files/pos/thistype.scala
parentdd1ebac2aae5844ba01dbe2aab6e7fd67e19c15a (diff)
downloadscala-d8a3d0acaa3ff4bae5a20ff64d265754e7c1fbe5.tar.gz
scala-d8a3d0acaa3ff4bae5a20ff64d265754e7c1fbe5.tar.bz2
scala-d8a3d0acaa3ff4bae5a20ff64d265754e7c1fbe5.zip
*** empty log message ***
Diffstat (limited to 'test/files/pos/thistype.scala')
-rw-r--r--test/files/pos/thistype.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/pos/thistype.scala b/test/files/pos/thistype.scala
new file mode 100644
index 0000000000..8c0ba209be
--- /dev/null
+++ b/test/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);
+
+}