NI: extract diagnostics from partially resolved call instead of separately handling it including running all checks

^KT-37630 Fixed
^KT-35494 Fixed
This commit is contained in:
Victor Petukhov
2020-05-22 16:10:52 +03:00
parent eaa16714f6
commit 379c6944a2
23 changed files with 72 additions and 35 deletions
@@ -0,0 +1,13 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNCHECKED_CAST -UNUSED_EXPRESSION
fun <T> consumeLongAndMaterialize(x: Long): T = null as T
fun consumeAny(x: Any) = x
fun main() {
consumeAny(consumeLongAndMaterialize(3 * 1000))
if (true) {
consumeLongAndMaterialize(3 * 1000)
} else true
}
@@ -0,0 +1,5 @@
package
public fun consumeAny(/*0*/ x: kotlin.Any): kotlin.Any
public fun </*0*/ T> consumeLongAndMaterialize(/*0*/ x: kotlin.Long): T
public fun main(): kotlin.Unit