Translate WhenUtils to Kotlin
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user