drop BASE_WITH_NULLABLE_UPPER_BOUND
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// KT-3559 Strange inference failure error message
|
||||
|
||||
public inline fun <T:Any, R> let(subj: T?, body: (T) -> R): R<!BASE_WITH_NULLABLE_UPPER_BOUND!>?<!> {
|
||||
public inline fun <T:Any, R> let(subj: T?, body: (T) -> R): R? {
|
||||
return if (subj != null) body(<!DEBUG_INFO_SMARTCAST!>subj<!>) else null
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ fun <T> getJavaClass() : java.lang.Class<T> { <!NO_RETURN_IN_FUNCTION_WITH_BLOCK
|
||||
|
||||
public class Throwables() {
|
||||
companion object {
|
||||
public fun <X : Throwable?> propagateIfInstanceOf(throwable : Throwable?, declaredType : Class<X<!BASE_WITH_NULLABLE_UPPER_BOUND!>?<!>>?) : Unit {
|
||||
public fun <X : Throwable?> propagateIfInstanceOf(throwable : Throwable?, declaredType : Class<X?>?) : Unit {
|
||||
if (((throwable != null) && declaredType?.isInstance(throwable)!!))
|
||||
{
|
||||
throw declaredType?.cast(throwable)!!
|
||||
@@ -17,5 +17,4 @@ public class Throwables() {
|
||||
propagateIfInstanceOf(throwable, getJavaClass<RuntimeException?>()) // Type inference failed: Mismatch while expanding constraints
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user