sky_alligator
01/17/2017, 5:49 PMhi, i am new to kotlin, this code i just couldn't visualize how the type inference works with compiler level:
fun <T,K> meth1(i: T):Student<T> {
if (i == 2) {
return Student()
}
else {
return meth2() // how the type inference works here ?
}
}
fun <K> meth2(): Student<K> {
return Student()
}