diff options
Diffstat (limited to 'test/files/pos/thistype.scala')
-rw-r--r-- | test/files/pos/thistype.scala | 14 |
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); + +} |