Fix prematurely analyzing a lambda while fixing a type variable for another argument

^KT-35168 Fixed
This commit is contained in:
victor.petukhov
2019-11-28 15:56:59 +03:00
parent c4a115720e
commit e246c23a46
10 changed files with 37 additions and 8 deletions
@@ -0,0 +1,14 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// !LANGUAGE: +NewInference
// SKIP_TXT
// Issue: KT-35168
class Inv<T>
// Before the fix, here we had an exception while fixing a type variable for Inv due to prematurely analyzing a lambda
// The exception was: "UninitializedPropertyAccessException: lateinit property subResolvedAtoms has not been initialized"
class Foo<T>(x: (T) -> T, y: Inv<Any>)
fun bar() {
Foo<Any>({}, Inv())
}