[NI] Report unstable smart cast directly instead of using SmartCastManager

Fix compilation errors, revealed by this fix.

SmartCastManager is unnecessary for error reporting, intermediate diagnostics from the NI contain all required infromation.
When SmartCastManager is used it leads to missing unstable smart casts in case of expressions with captured types.
This happens, because data flow info is recorded for original expression without captured types, which is used as a key.
DataFlowValues created from receivers with captured types can't be used to retrieve that info.

^KT-39010 Fixed
This commit is contained in:
Pavel Kirpichenkov
2020-05-20 12:49:38 +03:00
parent b808d5f381
commit 0b33e9430b
15 changed files with 156 additions and 15 deletions
@@ -0,0 +1,11 @@
class A<E> {
fun foo(): E = TODO()
}
class B(var a: A<*>?) {
fun bar() {
if (a != null) {
<!SMARTCAST_IMPOSSIBLE!>a<!>.foo()
}
}
}