[NI] Approximate intersection type in type argument to star if it's necessary

#KT-32196 Fixed
This commit is contained in:
Dmitriy Novozhilov
2019-12-19 14:27:58 +03:00
parent 26f7bf1c21
commit e730965bc5
15 changed files with 288 additions and 1 deletions
@@ -1,4 +1,6 @@
// !WITH_NEW_INFERENCE
// NI_EXPECTED_FILE
val test1 = { when (true) { true -> <!OI;IMPLICIT_CAST_TO_ANY!>1<!>; else -> <!OI;IMPLICIT_CAST_TO_ANY!>""<!> } }
val test2 = { { when (true) { true -> <!OI;IMPLICIT_CAST_TO_ANY!>1<!>; else -> <!OI;IMPLICIT_CAST_TO_ANY!>""<!> } } }