Fix warnings in stdlib/compiler/plugins/test code

This commit is contained in:
Alexander Udalov
2020-11-26 21:25:01 +01:00
parent b3d85e656e
commit 221f44da5f
48 changed files with 109 additions and 101 deletions
@@ -139,7 +139,7 @@ class BodyGenerator(val context: WasmFunctionCodegenContext) : IrElementVisitorV
val wasmGcType: WasmSymbol<WasmTypeDeclaration> = context.referenceGcType(klass.symbol)
klass.getWasmArrayAnnotation()?.let { wasmArrayInfo ->
if (klass.getWasmArrayAnnotation() != null) {
require(expression.valueArgumentsCount == 1) { "@WasmArrayOf constructs must have exactly one argument" }
generateExpression(expression.getValueArgument(0)!!)
body.buildRttCanon(context.transformType(klass.defaultType))
@@ -21,7 +21,6 @@ import org.jetbrains.kotlin.ir.util.isFunction
import org.jetbrains.kotlin.ir.util.parentAsClass
import org.jetbrains.kotlin.wasm.ir.*
class WasmModuleCodegenContextImpl(
override val backendContext: WasmBackendContext,
private val wasmFragment: WasmCompiledModuleFragment
@@ -100,8 +99,8 @@ class WasmModuleCodegenContextImpl(
wasmFragment.globals.define(irField, wasmGlobal)
}
override fun defineGcType(irClass: IrClassSymbol, wasmStruct: WasmTypeDeclaration) {
wasmFragment.gcTypes.define(irClass, wasmStruct)
override fun defineGcType(irClass: IrClassSymbol, wasmType: WasmTypeDeclaration) {
wasmFragment.gcTypes.define(irClass, wasmType)
}
override fun defineRTT(irClass: IrClassSymbol, wasmGlobal: WasmGlobal) {