[NI] Improvements for "not enough information" diagnostic

#KT-30590 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-04-23 00:45:29 +03:00
parent 09cc2ae27f
commit ff0993153c
13 changed files with 142 additions and 29 deletions
+2 -4
View File
@@ -1,11 +1,9 @@
// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
// !LANGUAGE: +NewInference
// Issue: KT-30590
// NI_EXPECTED_FILE
interface A
fun <T: A, R: T> emptyStrangeMap(): Map<T, R> = TODO()
fun test7() : Map<A, A> = emptyStrangeMap()
fun test() = emptyStrangeMap()
fun test() = <!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyStrangeMap<!>()
@@ -0,0 +1,11 @@
package
public fun </*0*/ T : A, /*1*/ R : T> emptyStrangeMap(): kotlin.collections.Map<T, R>
public fun test(): kotlin.collections.Map<???, ???>
public fun test7(): kotlin.collections.Map<A, A>
public interface A {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -1,6 +1,7 @@
package
public fun </*0*/ T : A, /*1*/ R : T> emptyStrangeMap(): kotlin.collections.Map<T, R>
public fun test(): [ERROR : Error function type]
public fun test7(): kotlin.collections.Map<A, A>
public interface A {