fun doSomething(a: T) {} class Foo { fun foo(x: Int) { doSomething("lol") } } fun bar(baz: Foo) { baz.foo(x = 1) }