Jakub Gwóźdź
07/16/2024, 1:19 PMimport java.util.function.Supplier
open class Bar {
fun <T> record(f: Supplier<T>): T {
println("$f is supplier")
return f.get()
}
fun record(f: Runnable): Unit {
println("$f is Runnable")
f.run()
}
}
class Foo : Bar() {
fun <T> foo(f: () -> T): T = try {
record(f)
} catch (e: Exception) {
throw e
}
}
Is this a known issue or should I create one in Youtrack?Sam
07/16/2024, 2:03 PMJakub Gwóźdź
07/17/2024, 6:23 AM