Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/completion/partialForIlt.kt
T
Pavel Kirpichenkov e9941f8c12 [NI] Implement algorithm for completion mode selection
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.
2019-12-25 14:59:05 +03:00

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)<!>)
}