Replaced sure() invocations with '!!' operator in diagnostic tests.

This commit is contained in:
Evgeny Gerashchenko
2012-09-14 17:22:34 +04:00
parent 6e62212727
commit 5de734c9f3
5 changed files with 7 additions and 7 deletions
@@ -4,9 +4,9 @@ fun getJavaClass<T>() : java.lang.Class<T> { return "" <!CAST_NEVER_SUCCEEDS!>as
public class Throwables() {
class object {
public fun propagateIfInstanceOf<X : Throwable?>(throwable : Throwable?, declaredType : Class<X?>?) {
if (((throwable != null) && declaredType?.isInstance(throwable).sure()))
if (((throwable != null) && declaredType?.isInstance(throwable)!!))
{
throw declaredType?.cast(throwable).sure()
throw declaredType?.cast(throwable)!!
}
}
public fun propagateIfPossible(throwable : Throwable?) {