SHARE
TWEET

Untitled

a guest Nov 14th, 2017 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. scala> class Hoge {
  2.      |   def m1: this.type = this // OK
  3.      |   def m2: this.type = new Hoge // NG
  4.      | }
  5. <console>:9: error: type mismatch;
  6.  found   : Hoge
  7.  required: Hoge.this.type
  8.          def m2: this.type = new Hoge // NG
RAW Paste Data
Top