Skip to content

Instantly share code, notes, and snippets.

@victornoel
Created June 14, 2010 14:41
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 victornoel/437765 to your computer and use it in GitHub Desktop.
Save victornoel/437765 to your computer and use it in GitHub Desktop.
abstract class C {
type T
var r: T = _
}
object C {
def m[CC <: C](t: CC)(nl: CC#T) {
t.r = nl // type mismatch; found : nl.type (with underlying type CC#T) required: t.T
}
}
class Ex {
val c = new C() {
type T = Int
}
C.m(c)(5)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment