[FE] Add clear warning about future changes about nullability of safe call with non nullable receiver

^KT-46860
This commit is contained in:
Dmitriy Novozhilov
2021-10-26 17:35:31 +03:00
committed by teamcityserver
parent 937f4c1dab
commit f26059a7d3
122 changed files with 323 additions and 283 deletions
@@ -10,7 +10,7 @@ public class Throwables() {
public fun <X : Throwable?> propagateIfInstanceOf(throwable : Throwable?, declaredType : Class<X?>?) : Unit {
if (((throwable != null) && declaredType?.isInstance(throwable)!!))
{
throw declaredType<!UNNECESSARY_SAFE_CALL!>?.<!>cast(throwable)!!
throw <!SAFE_CALL_WILL_CHANGE_NULLABILITY!>declaredType<!UNNECESSARY_SAFE_CALL!>?.<!>cast(throwable)<!>!!
}
}
public fun propagateIfPossible(throwable : Throwable?) : Unit {