Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion _overviews/FAQ/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,12 @@ For an in-depth treatment of types vs. classes, see the blog post

### How can a method in a superclass return a value of the “current” type?

Possible solutions include F-bounded polymorphism
First, note that using `this.type` won't work. People often try that,
but `this.type` means "the singleton type of this instance", a
different and too-specific meaning. Only `this` itself has the
type `this.type`; other instances do not.

What does work? Possible solutions include F-bounded polymorphism
_(familiar to Java programmers)_, type members,
and the [typeclass pattern](http://tpolecat.github.io/2013/10/12/typeclass.html).

Expand Down