drop BASE_WITH_NULLABLE_UPPER_BOUND

This commit is contained in:
Michael Nedzelsky
2015-10-14 19:15:08 +03:00
parent ced1edcf98
commit 57205f5721
24 changed files with 23 additions and 46 deletions
@@ -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
}
}
}
}