e9941f8c12
Current selection of completion mode for call is not always correct in case of full mode, and sometimes too conservative in case of partial mode. Updated algorithm checks constraints wrt position of type variables in return type and in other related constraints. Full completion happens if proper constraint requirements are satisfied for variables.
16 lines
492 B
Kotlin
Vendored
16 lines
492 B
Kotlin
Vendored
// !LANGUAGE: +NewInference
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
|
|
fun takeByte(ilt: Byte) {}
|
|
fun takeShort(ilt: Short) {}
|
|
fun takeInt(ilt: Int) {}
|
|
fun takeLong(ilt: Long) {}
|
|
|
|
fun <T> id(arg: T): T = arg
|
|
|
|
fun test() {
|
|
takeByte(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Byte")!>id(42)<!>)
|
|
takeShort(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Short")!>id(42)<!>)
|
|
takeInt(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>id(42)<!>)
|
|
takeLong(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Long")!>id(42)<!>)
|
|
} |