[NI] Move abstract class instantiation check to call checkers

This way the check works for callable reference arguments.
Also candidate applicability during resolution does not change compared to the old inference.
^KT-37530 Fixed
This commit is contained in:
Pavel Kirpichenkov
2020-03-17 11:46:26 +03:00
parent 3f00de5d7b
commit a416fde814
13 changed files with 195 additions and 17 deletions
@@ -0,0 +1,34 @@
// !WITH_NEW_IFERENCE
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
// FILE: packageA.kt
package a
abstract class Cls
abstract class Cls2
// FILE: packageB.kt
package b
fun Cls() {}
class Cls2
// FILE: test.kt
package c
import a.*
import b.*
fun take(arg: Any) {}
fun test() {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>Cls<!>()
take(<!OVERLOAD_RESOLUTION_AMBIGUITY!>Cls<!>())
<!UNRESOLVED_REFERENCE!>Cls2<!>()
take(<!UNRESOLVED_REFERENCE!>Cls2<!>())
}