[LL FIR] rename testdata to testData to avoid copyright generation
We exclude testData pattern from copyright scope
This commit is contained in:
committed by
Space Team
parent
aef5290210
commit
33e6a85a2d
@@ -0,0 +1,18 @@
|
||||
fun ex<caret>pression(expression: IrConst<*>) {
|
||||
when (val kind = expression.kind) {
|
||||
is Kind.Null -> kind.valueOf(expression)
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
sealed class Kind<T>(val asString: String) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun valueOf(aConst: IrConst<*>) = (aConst as IrConst<T>).value
|
||||
object Null : Kind<Nothing?>("Null")
|
||||
override fun toString() = asString
|
||||
}
|
||||
|
||||
abstract class IrConst<T> {
|
||||
abstract var kind: Kind<T>
|
||||
abstract var value: T
|
||||
}
|
||||
Reference in New Issue
Block a user