blob: 8c0ba209be200e9c315a5b4d5ec6ef40a6a3696c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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);
}
|