[FIR] Remove few unused utils
This commit is contained in:
committed by
teamcityserver
parent
75b6f7ca00
commit
75ed11a620
-17
@@ -6,12 +6,8 @@
|
||||
package org.jetbrains.kotlin.fir.declarations.utils
|
||||
|
||||
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
||||
import org.jetbrains.kotlin.fir.declarations.FirFile
|
||||
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||
import org.jetbrains.kotlin.fir.declarations.builder.FirRegularClassBuilder
|
||||
import org.jetbrains.kotlin.fir.declarations.builder.FirTypeParameterBuilder
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirFileImpl
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirRegularClassImpl
|
||||
|
||||
fun FirTypeParameterBuilder.addDefaultBoundIfNecessary() {
|
||||
if (bounds.isEmpty()) {
|
||||
@@ -26,16 +22,3 @@ fun FirRegularClassBuilder.addDeclaration(declaration: FirDeclaration) {
|
||||
fun FirRegularClassBuilder.addDeclarations(declarations: Collection<FirDeclaration>) {
|
||||
declarations.forEach(this::addDeclaration)
|
||||
}
|
||||
|
||||
fun FirFile.addDeclaration(declaration: FirDeclaration) {
|
||||
require(this is FirFileImpl)
|
||||
declarations += declaration
|
||||
}
|
||||
|
||||
fun FirRegularClass.addDeclaration(declaration: FirDeclaration) {
|
||||
@Suppress("LiftReturnOrAssignment")
|
||||
when (this) {
|
||||
is FirRegularClassImpl -> declarations += declaration
|
||||
else -> throw IllegalStateException()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user