[FIR] Properly approximate return type of callable declarations

- approximate intersection types in all non-local declarations
- approximate local types in non-private non-local declarations
This commit is contained in:
Dmitriy Novozhilov
2022-11-10 15:34:40 +02:00
committed by Space Team
parent 0f70635fcb
commit 01c6c7dc59
19 changed files with 190 additions and 230 deletions
@@ -255,7 +255,7 @@ fun <K, V> Map<K, V>.compactIfPossible(): Map<K, V> =
else -> this
}
inline fun <T> T.applyIf(`if`: Boolean, body: T.() -> T): T =
inline fun <T, R : T> R.applyIf(`if`: Boolean, body: R.() -> T): T =
if (`if`) body() else this