summaryrefslogblamecommitdiff
path: root/test/files/pos/thistype.scala
blob: ac315f3323699abd34826150f41c4d00c1883cbf (plain) (tree)
1
2
3
4
5
6
7
8
9
10


             
                                                               


                              
                                                                   

   


                                         

 
object Test {

  class Ctl {
    def enable: this.type = { Console.println("enable"); this }
  }

  class MouseCtl extends Ctl {
    def mouseDown(x: Int, y: Int) { Console.println("mouse down") }
  }

  def main(args: Array[String]) {
    new MouseCtl().enable.mouseDown(1, 2)
  }

}