Skip to content

Instantly share code, notes, and snippets.

@VladimirReshetnikov
Created June 27, 2015 00:34
Show Gist options
  • Save VladimirReshetnikov/c1cccc300b10bbc437cc to your computer and use it in GitHub Desktop.
Save VladimirReshetnikov/c1cccc300b10bbc437cc to your computer and use it in GitHub Desktop.
interface A {
fun f(x : Int) {}
}
interface B<T> : A {
fun f(y: T)
}
interface C : B<Int>
fun foo(b : B<Int>, c : C) {
b.f(x = 1) // OK
b.f(y = 1) // OK
b.f(1) // Error: Overload resolution ambiguity
c.f(x = 1) // Error: Cannot find a parameter with this name: x
c.f(y = 1) // OK
c.f(1) // OK
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment