FirConstKind has been renamed to ConstantValueKind (d243319)
This commit is contained in:
@@ -32,24 +32,24 @@ fun generateFirMap(): String {
|
||||
"""
|
||||
|package org.jetbrains.kotlin.fir.evaluate
|
||||
|
|
||||
|import org.jetbrains.kotlin.fir.expressions.FirConstKind
|
||||
|import org.jetbrains.kotlin.types.ConstantValueKind
|
||||
|
|
||||
|/** This file is generated by org.jetbrains.kotlin.generators.evaluate:generateFirMap(). DO NOT MODIFY MANUALLY */
|
||||
|
|
||||
|internal data class UnaryOperationKey<out T>(val opr: FirConstKind<out T>, val opName: String)
|
||||
|internal data class BinaryOperationKey<out T, out U>(val opr1: FirConstKind<out T>, val opr2: FirConstKind<out U>, val opName: String)
|
||||
|internal data class UnaryOperationKey<out T>(val opr: ConstantValueKind<out T>, val opName: String)
|
||||
|internal data class BinaryOperationKey<out T, out U>(val opr1: ConstantValueKind<out T>, val opr2: ConstantValueKind<out U>, val opName: String)
|
||||
|
|
||||
|@Suppress("UNCHECKED_CAST")
|
||||
|private fun <T> unaryOperation(
|
||||
| t: FirConstKind<T>,
|
||||
| t: ConstantValueKind<T>,
|
||||
| opName: String,
|
||||
| operation: Function1<T, Number>
|
||||
|) = UnaryOperationKey(t, opName) to operation as Function1<Number, Number>
|
||||
|
|
||||
|@Suppress("UNCHECKED_CAST")
|
||||
|private fun <T, U> binaryOperation(
|
||||
| t: FirConstKind<T>,
|
||||
| u: FirConstKind<U>,
|
||||
| t: ConstantValueKind<T>,
|
||||
| u: ConstantValueKind<U>,
|
||||
| opName: String,
|
||||
| operation: Function2<T, U, Number>
|
||||
|) = BinaryOperationKey(t, u, opName) to operation as Function2<Number, Number, Number>
|
||||
@@ -122,4 +122,4 @@ private fun Printer.renderBinaryOperations(binaryOperationsMap: List<Pair<String
|
||||
}
|
||||
}
|
||||
|
||||
private fun KotlinType.asString(): String = "FirConstKind." + constructor.declarationDescriptor!!.name.asString()
|
||||
private fun KotlinType.asString(): String = "ConstantValueKind." + constructor.declarationDescriptor!!.name.asString()
|
||||
|
||||
Reference in New Issue
Block a user