```hi, i am new to kotlin, this code i just could...
# getting-started
s
Copy code
hi, 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()
}