[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
@@ -1,20 +0,0 @@
//KT-2856 Fix the getOrElse signature to be able to return any supertype of V
package d
import java.util.HashMap
public inline fun <K,V1, V: V1> Map<K,V>.getOrElse1(key: K, defaultValue: ()-> V1) : V1 {
if (this.containsKey(key)) {
return this.get(key) as V
} else {
return defaultValue()
}
}
fun main() {
val map = HashMap<Int, Int>()
println(map.getOrElse1(2, { null })) // Error
}
//from standard library
fun println(message : Any?) {}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
//KT-2856 Fix the getOrElse signature to be able to return any supertype of V
package d