Translate WhenUtils to Kotlin

This commit is contained in:
Alexey Sedunov
2013-11-18 13:44:34 +04:00
parent 72f4ae3a13
commit 05d9cbd67d
8 changed files with 234 additions and 247 deletions
@@ -16,7 +16,6 @@
package org.jetbrains.jet.lang.psi;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -70,3 +70,6 @@ fun JetClassOrObject.effectiveDeclarations(): List<JetDeclaration> =
}
fun JetClass.isAbstract() = isTrait() || hasModifier(JetTokens.ABSTRACT_KEYWORD)
[suppress("UNCHECKED_CAST")]
fun <T: PsiElement> PsiElement.replaced(newElement: T): T = replace(newElement)!! as T