Commit Graph

4 Commits

Author SHA1 Message Date
pyos 63b0708ed5 FIR CFG: join/unify data flow from postponed lambdas at each level
For example:

    foo(
        // `if` joins A & B
        if (condition)
            run { ... } // A
        else
            run { ... }, // B
        run { ... } // C
    ) // `foo` unifies `A & B` and `C`, so if it is not resolved itself,
      // further `if`s, `when`s, safe calls outside it, etc. continue
      // building the correct type predicate until the next completed
      // call.

^KT-44512 Fixed
2022-06-15 20:05:49 +00:00
Mikhail Glukhikh 7d4eaefd36 FIR: report UNSAFE_CALL on dot when possible 2021-01-29 16:55:26 +03:00
Jinseong Jeon e72ddbcbfe FIR checker: differentiate UNSAFE_CALL from INAPPLICABLE_CANDIDATE
To do so, inside the root cause of inapplicable candidate errors,
we will record expected/actual type of receiver, if any.
That will help identifying inapplicable calls on nullable receiver.
2021-01-29 16:54:23 +03:00
Dmitriy Novozhilov 2536fa0cd5 [FIR-TEST] Add new testdata generated after changes in previous commit 2019-12-12 16:11:46 +03:00