Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scala> class Hoge {
- | def m1: this.type = this // OK
- | def m2: this.type = new Hoge // NG
- | }
- <console>:9: error: type mismatch;
- found : Hoge
- required: Hoge.this.type
- def m2: this.type = new Hoge // NG
Add Comment
Please, Sign In to add comment