[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
@@ -36,11 +36,11 @@ fun test2(b: Boolean) {
}
fun test3(b: Boolean) {
var x = <!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>")!>foo3 { 1 }<!>
var x = <!DEBUG_INFO_EXPRESSION_TYPE("I1")!>foo3 { 1 }<!>
if (b) {
x = <!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>")!>foo3 { 2 }<!>
x = <!DEBUG_INFO_EXPRESSION_TYPE("I1")!>foo3 { 2 }<!>
}
x.bar()
x.<!UNRESOLVED_REFERENCE!>bar<!>()
}
fun test4(b: Boolean) {
@@ -36,11 +36,11 @@ fun test2(b: Boolean) {
}
fun test3(b: Boolean) {
var x = <!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>")!>foo3 { 1 }<!>
var x = <!DEBUG_INFO_EXPRESSION_TYPE("I1")!>foo3 { 1 }<!>
if (b) {
x = <!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>")!>foo3 { 2 }<!>
x = <!DEBUG_INFO_EXPRESSION_TYPE("I1")!>foo3 { 2 }<!>
}
x.bar()
x.<!UNRESOLVED_REFERENCE!>bar<!>()
}
fun test4(b: Boolean) {