Skip to content

Instantly share code, notes, and snippets.

@okomok
Created April 27, 2009 10:24
Show Gist options
  • Save okomok/102427 to your computer and use it in GitHub Desktop.
Save okomok/102427 to your computer and use it in GitHub Desktop.
forwarding
trait Func0 {
type A1 <: Any
type A2 <: Any
type apply2[x <: A1, y <: A2]
}
type foo[f <: Func0 { type A1 >: String; type A2 >: Any }] = f#apply2[String, Any]
trait f extends Func0 {
type A1 = String
type A2 = Any
override type apply2[x <: A1, y <: Any] = y
}
type kk = foo[f]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment