<Kotlin inline function call vs function call with...
# stackoverflow
u
Kotlin inline function call vs function call with default type argument Consider the following code: fun foo(type: Class = Any::class.java) { } inline fun foo() { } fun main() { foo() // ERROR! } This code causes the following error: Type inference failed: Not enough information to infer parameter T in inline fun foo(): Unit Please specify it explicitly. Why doesn't the compiler just default to the non-inlined function, with a default argument?