Straighten out MemberIndex calculation in LazyJavaStaticScope

Also delete confusing "inn" function
This commit is contained in:
Alexander Udalov
2014-09-12 17:18:01 +04:00
parent 0cb7c08a7a
commit e9ae06a53e
3 changed files with 21 additions and 28 deletions
@@ -16,9 +16,7 @@
package org.jetbrains.kotlin.util
public fun <T: Any, R> T?.inn(then: (T) -> R, _else: R): R = if (this != null) then(this) else _else
public fun <T: Any> T?.sure(message: String): T = this ?: throw AssertionError(message)
public fun <T : Any> T?.sure(message: String): T = this ?: throw AssertionError(message)
fun <T> T.printAndReturn(message: String = ""): T {
if (!message.isEmpty()) {
@@ -26,4 +24,4 @@ fun <T> T.printAndReturn(message: String = ""): T {
}
println(this)
return this
}
}