[FIR] Add UNCHECKED_CAST

Regenerate diagnostics code
This commit is contained in:
Ivan Kochurkin
2021-09-16 23:24:58 +03:00
committed by TeamCityServer
parent 1fbccff1bd
commit d0a4ca199d
70 changed files with 118 additions and 933 deletions
@@ -5,11 +5,11 @@ fun foo(b: B<Int, Int>) {}
fun test_1(b: B<String, Number>) {
foo(b.myMap {
it.k.length // implicits
} as B<Int, Int>)
} <!UNCHECKED_CAST!>as B<Int, Int><!>)
}
fun test_2(s: String) {
val func = { s.length } <!CAST_NEVER_SUCCEEDS!>as<!> B<Int, Int>
val func = { s.length } <!UNCHECKED_CAST!>as B<Int, Int><!>
}
class B<out K, V>(val k: K, val v: V)
@@ -12,6 +12,6 @@ interface AbstractFirBasedSymbol<E> where E : FirSymbolOwner<E>, E : FirDeclarat
fun foo(firAdaptee: FirFunction<*>) {}
fun test(symbol: AbstractFirBasedSymbol<*>) {
val firAdaptee = symbol.fir as FirFunction
val firAdaptee = symbol.fir <!UNCHECKED_CAST!>as FirFunction<!> // TODO: KT-48832
foo(firAdaptee)
}