[NI] Check stub types in result type
An uninferred parameter stub may leak through calculation of CST(Inv<Uninferred Stub>, Nothing) into a result type. A stub type in the result type means a type error. So we can afford recalculating CST with stub-containing types filtered out, since its an error anyway. This prevents stub types leakages and helps with reporting type error diagnostics. KT-35914 Fixed KT-35943 Fixed
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
class Inv<T>
|
||||
fun <T> bar(x: Inv<T>.() -> Unit) = x
|
||||
|
||||
fun box(): String {
|
||||
listOf(
|
||||
bar<Char> { },
|
||||
bar { } // the problem is here
|
||||
)
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user