Render contracts in kotlinp, fix minor bug in kotlinx-metadata-jvm
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
- [`KT-31308`](https://youtrack.jetbrains.com/issue/KT-31308) Add module name extensions to kotlinx-metadata-jvm
|
||||
- [`KT-31338`](https://youtrack.jetbrains.com/issue/KT-31338) Retain "is moved from interface companion" property flag in kotlinx-metadata-jvm
|
||||
- Breaking change: JvmPropertyExtensionVisitor.visit has a new parameter `jvmFlags: Flags`
|
||||
- Correctly write "null" constant value in effect expression of a contract
|
||||
- Rename `desc` parameters to `signature` in JvmFunctionExtensionVisitor, JvmPropertyExtensionVisitor, JvmConstructorExtensionVisitor
|
||||
|
||||
## 0.0.5
|
||||
|
||||
@@ -384,11 +384,10 @@ private fun writeEffectExpression(c: WriteContext, output: (ProtoBuf.Expression.
|
||||
}
|
||||
|
||||
override fun visitConstantValue(value: Any?) {
|
||||
@Suppress("UNUSED_VARIABLE") // force exhaustive when
|
||||
val unused = when (value) {
|
||||
when (value) {
|
||||
true -> t.constantValue = ProtoBuf.Expression.ConstantValue.TRUE
|
||||
false -> t.constantValue = ProtoBuf.Expression.ConstantValue.FALSE
|
||||
null -> null
|
||||
null -> t.constantValue = ProtoBuf.Expression.ConstantValue.NULL
|
||||
else -> throw IllegalArgumentException("Only true, false or null constant values are allowed for effects (was=$value)")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user