Look at the following code:
fun <T> T.foo(): Unit { /* Doing something */ }When the generic function foo is called as "str".foo(), what type will be inferred for the type parameter T?
Look at the following code:
fun <T> T.foo(): Unit { /* Doing something */ }When the generic function foo is called as "str".foo(), what type will be inferred for the type parameter T?
Create a free account to access the full topic