Guest User

Untitled

a guest
Nov 14th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment