NI: Improve postponed arguments analysis

Introduce seven stages:
1) Analyze postponed arguments with fixed parameter types
2) Collect parameter types from constraints and lambda parameters' declaration
3) Fix not postponed variables for parameter types of all postponed arguments
4) Create atoms with revised expected types if needed
5) Analyze the first ready postponed argument and rerun stages if it has been analyzed
6) Force fixation remaining type variables: fix if possible or report not enough information
7) Force analysis remaining not analyzed postponed arguments and rerun stages if there are

^KT-37952 Fixed
^KT-32156 Fixed
^KT-37249 Fixed
^KT-37341 Fixed
This commit is contained in:
Victor Petukhov
2020-03-28 20:40:29 +03:00
parent 50151e0e01
commit 260683c20e
70 changed files with 2619 additions and 352 deletions
@@ -19,6 +19,4 @@ fun test() {
baz<(Int) -> Unit>(id(::foo), id(id(::foo)))
baz(id(::foo), id(id<(Int) -> Unit>(::foo)))
baz(id(::foo), id<(Int) -> Unit>(id(::foo)))
baz(id { it.inv() }, id<(Int) -> Unit> { })
}