Fail calls constraints of which contain uninferred type parameter
^KT-44055 Fixed It's possible only if there is a callable reference among subcalls which go though the old type inference (and the error for uninferred type parameter wasn't reported)
This commit is contained in:
+1
@@ -1,4 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
-29
@@ -32,12 +32,6 @@ fun poll16(flag: Boolean): Any? {
|
||||
return inv()
|
||||
}
|
||||
|
||||
// TODO
|
||||
//fun poll17(flag: Boolean): Any? {
|
||||
// val inv = if (flag) { foo7() } else { ::Foo7 }
|
||||
// return inv
|
||||
//}
|
||||
|
||||
fun poll21(flag: Boolean): Any? {
|
||||
val inv = when (flag) { true -> ::bar2 else -> ::foo2 }
|
||||
return inv()
|
||||
@@ -48,12 +42,6 @@ fun poll25(flag: Boolean): Any? {
|
||||
return inv
|
||||
}
|
||||
|
||||
// TODO
|
||||
//fun poll26(flag: Boolean): Any? {
|
||||
// val inv = when (flag) { true -> ::Foo7 false -> foo7() else -> ::Foo7 }
|
||||
// return inv
|
||||
//}
|
||||
|
||||
fun poll31(flag: Boolean): Any? {
|
||||
val inv = when (flag) { true -> ::bar2 false -> ::foo2 }
|
||||
return inv()
|
||||
@@ -64,12 +52,6 @@ fun poll35(flag: Boolean): Any? {
|
||||
return inv
|
||||
}
|
||||
|
||||
// TODO
|
||||
//fun poll36(flag: Boolean): Any? {
|
||||
// val inv = when (flag) { true -> ::Foo7 false -> foo7() }
|
||||
// return inv
|
||||
//}
|
||||
|
||||
fun poll41(): Any? {
|
||||
val inv = try { ::bar2 } finally { ::foo2 }
|
||||
return inv()
|
||||
@@ -90,12 +72,6 @@ fun poll55(): Any? {
|
||||
return inv()
|
||||
}
|
||||
|
||||
// TODO
|
||||
//fun poll56(): Any? {
|
||||
// val inv = try { ::Foo7 } catch (e: Exception) { foo7() } finally { foo7() }
|
||||
// return inv
|
||||
//}
|
||||
|
||||
fun poll61(): Any? {
|
||||
val inv = ::bar2
|
||||
return inv
|
||||
@@ -121,7 +97,6 @@ fun poll81(): Any? {
|
||||
return inv
|
||||
}
|
||||
|
||||
|
||||
fun poll85(): Any? {
|
||||
val inv = ::Foo6 in setOf(::Foo6)
|
||||
return inv
|
||||
@@ -131,18 +106,14 @@ fun box(): String {
|
||||
poll1(true)
|
||||
poll11(true)
|
||||
poll16(true)
|
||||
// poll17(true)
|
||||
poll21(true)
|
||||
poll25(true)
|
||||
// poll26(true)
|
||||
poll31(true)
|
||||
poll35(true)
|
||||
// poll36(true)
|
||||
poll41()
|
||||
poll45()
|
||||
poll51()
|
||||
poll55()
|
||||
// poll56()
|
||||
poll61()
|
||||
poll65()
|
||||
poll71()
|
||||
|
||||
Reference in New Issue
Block a user