Commit Graph

2 Commits

Author SHA1 Message Date
Kirill Rakhman 251827c9aa [FIR] Don't approximate captured types
This fixes some type argument mismatch errors caused by a captured type
being approximated and then captured again.
Some places need to be adapted to work with captured types that
previously only worked with approximated types.

#KT-62959 Fixed
2024-01-17 08:20:05 +00:00
Dmitriy Novozhilov 8ff4af034a [FIR] Don't drop directly inherited functions from origins for intersection overrides in intersection scope
```
open class Base<T> {
    fun foo(): T = ...
}

class Derived<T> : Base<T> {
    override fun foo(): T = ...
}
```

In intersection scope of type `Base<T> & Other<R>` we should create
  intersection override based on `Base.foo(): T` and `Derived.foo(): R`
  at the same time, despite the fact that `Derived.foo` actually directly
  overrides `Base.foo`

^KT-56722 Fixed
2023-02-28 09:17:41 +00:00