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


             
                                                               


                              
                                                                            





                                          
object Test {

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

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

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

}