Skip to content

Instantly share code, notes, and snippets.

@retronym
Created November 7, 2009 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save retronym/228724 to your computer and use it in GitHub Desktop.
Save retronym/228724 to your computer and use it in GitHub Desktop.
The special type this.type
trait T {
def me: this.type = this
}
class W {
def woohoo: String = "woohoo"
}
println((new W with T).me.woohoo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment