We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89bb804 commit 4bfc6e1Copy full SHA for 4bfc6e1
_overviews/FAQ/index.md
@@ -229,7 +229,12 @@ For an in-depth treatment of types vs. classes, see the blog post
229
230
### How can a method in a superclass return a value of the “current” type?
231
232
-Possible solutions include F-bounded polymorphism
+First, note that using `this.type` won't work. People often try that,
233
+but `this.type` means "the singleton type of this instance", a
234
+different and too-specific meaning. Only `this` itself has the
235
+type `this.type`; other instances do not.
236
+
237
+What does work? Possible solutions include F-bounded polymorphism
238
_(familiar to Java programmers)_, type members,
239
and the [typeclass pattern](http://tpolecat.github.io/2013/10/12/typeclass.html).
240
0 commit comments