[FIR] Increase level of sequential when branches

Level of CFGNode is used to determine which call is a common one for
  creating node with union of arguments (to merge flow from multiple
  in-place lambdas). Before this change calls in different when branches
  may have same node level, which entail passing smartcasts from moddle of
  one branch to another

```
val x: Any = ...
when {
    ... -> run { x as String } // (1)
    ... -> {
        run {
            x.foo()
        } // (2)
        "hello"
    }
}
```

Call `(1)` was assumed as argument of call `(2)` which is incorrect

#KT-44814 Fixed
This commit is contained in:
Dmitriy Novozhilov
2021-02-12 14:40:41 +03:00
parent 92271527cb
commit 40e286b354
13 changed files with 1940 additions and 2 deletions
File diff suppressed because it is too large Load Diff