Fix NON_EXHAUSTIVE_WHEN_STATEMENT warnings in project code
This commit is contained in:
committed by
teamcityserver
parent
a6edd852ff
commit
f3116cb64a
@@ -118,7 +118,7 @@ class ChangesCollector {
|
||||
storage[packageProtoKey?.let { FqName(it) } ?: fqName] = newData
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (oldData != null) {
|
||||
when (oldData) {
|
||||
is ClassProtoData -> {
|
||||
removed.add(oldData.nameResolver.getClassId(oldData.proto.fqName).asSingleFqName())
|
||||
|
||||
@@ -303,6 +303,7 @@ object JvmRuntimeVersionsConsistencyChecker {
|
||||
}
|
||||
FileKind.OldRuntime -> jars.add(KotlinLibraryFile(jarFile, ApiVersion.KOTLIN_1_0.version))
|
||||
FileKind.LibraryWithBundledRuntime -> otherLibrariesWithBundledRuntime.add(jarFile)
|
||||
FileKind.Irrelevant -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -58,6 +58,7 @@ interface FirDeclarationPresenter {
|
||||
is ConeKotlinType -> {
|
||||
appendRepresentation(it)
|
||||
}
|
||||
is ConeKotlinTypeConflictingProjection -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -197,6 +197,7 @@ object FirConflictsChecker : FirBasicDeclarationChecker() {
|
||||
}
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
if (declarationName != null) {
|
||||
session.lookupTracker?.recordLookup(
|
||||
|
||||
+1
@@ -130,6 +130,7 @@ object FirInlineClassDeclarationChecker : FirRegularClassChecker() {
|
||||
}
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -37,6 +37,7 @@ object FirNestedClassChecker : FirRegularClassChecker() {
|
||||
reporter.reportOn(declaration.source, NESTED_CLASS_NOT_ALLOWED, declaration.description, context)
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -39,6 +39,7 @@ object FirProjectionRelationChecker : FirBasicDeclarationChecker() {
|
||||
}
|
||||
is FirTypeAlias ->
|
||||
checkTypeRef(declaration.expandedTypeRef, context, reporter)
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -48,6 +48,7 @@ object FirReturnAllowedChecker : FirReturnExpressionChecker() {
|
||||
}
|
||||
is FirProperty -> if (!containingDeclaration.isLocal) return false
|
||||
is FirValueParameter -> return true
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
||||
@@ -857,6 +857,8 @@ class HtmlFirDump internal constructor(private var linkResolver: FirLinkResolver
|
||||
}
|
||||
is ConeIntersectionType -> resolved { generate(type) }
|
||||
is ConeIntegerLiteralType -> inlineUnsupported(type)
|
||||
is ConeLookupTagBasedType,
|
||||
is ConeStubType -> {}
|
||||
}
|
||||
generateTypeArguments(type)
|
||||
if (type.isMarkedNullable) {
|
||||
|
||||
+2
@@ -76,6 +76,7 @@ class FirElementSerializer private constructor(
|
||||
is FirProperty -> propertyProto(declaration)?.let { builder.addProperty(it) }
|
||||
is FirSimpleFunction -> functionProto(declaration)?.let { builder.addFunction(it) }
|
||||
is FirTypeAlias -> typeAliasProto(declaration)?.let { builder.addTypeAlias(it) }
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,6 +152,7 @@ class FirElementSerializer private constructor(
|
||||
is FirProperty -> propertyProto(declaration)?.let { builder.addProperty(it) }
|
||||
is FirSimpleFunction -> functionProto(declaration)?.let { builder.addFunction(it) }
|
||||
is FirEnumEntry -> enumEntryProto(declaration).let { builder.addEnumEntry(it) }
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ class Fir2IrConverter(
|
||||
when (it) {
|
||||
is FirRegularClass -> processClassAndNestedClassHeaders(it)
|
||||
is FirTypeAlias -> classifierStorage.registerTypeAlias(it, declarationStorage.getIrFile(file))
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,6 +108,7 @@ class Fir2IrConverter(
|
||||
when (declaration) {
|
||||
is FirSimpleFunction -> processedCallableNames += declaration.name
|
||||
is FirProperty -> processedCallableNames += declaration.name
|
||||
else -> {}
|
||||
}
|
||||
processMemberDeclaration(declaration, anonymousObject, irClass) ?: continue
|
||||
}
|
||||
|
||||
@@ -155,6 +155,7 @@ class Fir2IrDeclarationStorage(
|
||||
constructorCache[declaration] = irConstructor
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,6 +249,7 @@ private fun ConeClassifierLookupTag.enhanceMutability(
|
||||
return ConeClassLikeLookupTagImpl(mutableId)
|
||||
}
|
||||
}
|
||||
null -> {}
|
||||
}
|
||||
|
||||
return this
|
||||
|
||||
@@ -118,6 +118,7 @@ private fun StringBuilder.appendConeType(coneType: ConeKotlinType) {
|
||||
is ConeFlexibleType -> {
|
||||
appendConeType(coneType.lowerBound)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -265,6 +265,7 @@ private fun FirRegularClass.computeSamCandidateNames(session: FirSession): Set<N
|
||||
is FirSimpleFunction -> if (declaration.modality == Modality.ABSTRACT) {
|
||||
samCandidateNames.add(declaration.name)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -41,6 +41,7 @@ data class ArgumentMapping(
|
||||
is ResolvedCallArgument.VarargArgument -> resolvedArgument.arguments.forEach {
|
||||
argumentToParameterMapping[it] = valueParameter
|
||||
}
|
||||
ResolvedCallArgument.DefaultArgument -> {}
|
||||
}
|
||||
}
|
||||
return argumentToParameterMapping
|
||||
|
||||
+4
-5
@@ -293,11 +293,9 @@ abstract class AbstractFirStatusResolveTransformer(
|
||||
}
|
||||
return when (declaration) {
|
||||
is FirCallableDeclaration -> {
|
||||
when (declaration) {
|
||||
is FirFunction -> {
|
||||
for (valueParameter in declaration.valueParameters) {
|
||||
transformValueParameter(valueParameter, data)
|
||||
}
|
||||
if (declaration is FirFunction) {
|
||||
for (valueParameter in declaration.valueParameters) {
|
||||
transformValueParameter(valueParameter, data)
|
||||
}
|
||||
}
|
||||
declaration
|
||||
@@ -397,6 +395,7 @@ abstract class AbstractFirStatusResolveTransformer(
|
||||
when (superClass) {
|
||||
is FirRegularClass -> forceResolveStatusesOfClass(superClass)
|
||||
is FirTypeAlias -> forceResolveStatusOfCorrespondingClass(superClass.expandedTypeRef)
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -59,6 +59,7 @@ class FirGlobalClassGenerationProcessor(
|
||||
when (owner) {
|
||||
is FirRegularClass -> owner.addDeclaration(klass)
|
||||
is FirFile -> owner.addDeclaration(klass)
|
||||
else -> {}
|
||||
}
|
||||
session.generatedClassIndex.registerClass(klass, owner)
|
||||
session.predicateBasedProvider.registerGeneratedDeclaration(klass, owner)
|
||||
|
||||
+7
-9
@@ -33,16 +33,14 @@ class FirClassDeclaredMemberScope(
|
||||
private val callablesIndex: Map<Name, List<FirCallableSymbol<*>>> = run {
|
||||
val result = mutableMapOf<Name, MutableList<FirCallableSymbol<*>>>()
|
||||
loop@ for (declaration in klass.declarations) {
|
||||
when (declaration) {
|
||||
is FirCallableDeclaration -> {
|
||||
val name = when (declaration) {
|
||||
is FirConstructor -> CONSTRUCTOR_NAME
|
||||
is FirVariable -> if (declaration.isSynthetic) continue@loop else declaration.name
|
||||
is FirSimpleFunction -> declaration.name
|
||||
else -> continue@loop
|
||||
}
|
||||
result.getOrPut(name) { mutableListOf() } += declaration.symbol
|
||||
if (declaration is FirCallableDeclaration) {
|
||||
val name = when (declaration) {
|
||||
is FirConstructor -> CONSTRUCTOR_NAME
|
||||
is FirVariable -> if (declaration.isSynthetic) continue@loop else declaration.name
|
||||
is FirSimpleFunction -> declaration.name
|
||||
else -> continue@loop
|
||||
}
|
||||
result.getOrPut(name) { mutableListOf() } += declaration.symbol
|
||||
}
|
||||
}
|
||||
result
|
||||
|
||||
@@ -240,6 +240,7 @@ class FirRenderer(builder: StringBuilder, private val mode: RenderMode = RenderM
|
||||
print(callableDeclaration.symbol.callableId)
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
|
||||
if (callableDeclaration is FirFunction) {
|
||||
@@ -382,6 +383,7 @@ class FirRenderer(builder: StringBuilder, private val mode: RenderMode = RenderM
|
||||
memberDeclaration.typeParameters.renderTypeParameters()
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+17
-1
@@ -2,7 +2,7 @@
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
@file:Suppress("DEPRECATION", "DEPRECATION_ERROR", "NON_EXHAUSTIVE_WHEN")
|
||||
@file:Suppress("DEPRECATION", "DEPRECATION_ERROR")
|
||||
|
||||
package org.jetbrains.kotlin.resolve.constants.evaluate
|
||||
|
||||
@@ -106,6 +106,7 @@ fun evalUnaryOp(name: String, type: CompileTimeType, value: Any): Any? {
|
||||
"length" -> return (value as String).length
|
||||
"toString" -> return (value as String).toString()
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
return null
|
||||
}
|
||||
@@ -122,6 +123,7 @@ fun evalBinaryOp(name: String, leftType: CompileTimeType, left: Any, rightType:
|
||||
ANY -> when (name) {
|
||||
"equals" -> return (left as Boolean).equals(right)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
BYTE -> when (rightType) {
|
||||
BYTE -> when (name) {
|
||||
@@ -183,6 +185,7 @@ fun evalBinaryOp(name: String, leftType: CompileTimeType, left: Any, rightType:
|
||||
ANY -> when (name) {
|
||||
"equals" -> return (left as Byte).equals(right)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
CHAR -> when (rightType) {
|
||||
CHAR -> when (name) {
|
||||
@@ -196,6 +199,7 @@ fun evalBinaryOp(name: String, leftType: CompileTimeType, left: Any, rightType:
|
||||
"minus" -> return (left as Char).minus(right as Int)
|
||||
"plus" -> return (left as Char).plus(right as Int)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
DOUBLE -> when (rightType) {
|
||||
BYTE -> when (name) {
|
||||
@@ -251,6 +255,7 @@ fun evalBinaryOp(name: String, leftType: CompileTimeType, left: Any, rightType:
|
||||
ANY -> when (name) {
|
||||
"equals" -> return (left as Double).equals(right)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
FLOAT -> when (rightType) {
|
||||
BYTE -> when (name) {
|
||||
@@ -306,6 +311,7 @@ fun evalBinaryOp(name: String, leftType: CompileTimeType, left: Any, rightType:
|
||||
ANY -> when (name) {
|
||||
"equals" -> return (left as Float).equals(right)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
INT -> when (rightType) {
|
||||
INT -> when (name) {
|
||||
@@ -373,6 +379,7 @@ fun evalBinaryOp(name: String, leftType: CompileTimeType, left: Any, rightType:
|
||||
ANY -> when (name) {
|
||||
"equals" -> return (left as Int).equals(right)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
LONG -> when (rightType) {
|
||||
LONG -> when (name) {
|
||||
@@ -440,6 +447,7 @@ fun evalBinaryOp(name: String, leftType: CompileTimeType, left: Any, rightType:
|
||||
ANY -> when (name) {
|
||||
"equals" -> return (left as Long).equals(right)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
SHORT -> when (rightType) {
|
||||
BYTE -> when (name) {
|
||||
@@ -501,6 +509,7 @@ fun evalBinaryOp(name: String, leftType: CompileTimeType, left: Any, rightType:
|
||||
ANY -> when (name) {
|
||||
"equals" -> return (left as Short).equals(right)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
STRING -> when (rightType) {
|
||||
STRING -> when (name) {
|
||||
@@ -513,7 +522,9 @@ fun evalBinaryOp(name: String, leftType: CompileTimeType, left: Any, rightType:
|
||||
INT -> when (name) {
|
||||
"get" -> return (left as String).get(right as Int)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
return null
|
||||
}
|
||||
@@ -551,6 +562,7 @@ fun checkBinaryOp(
|
||||
"rem" -> return left.rem(right)
|
||||
"times" -> return left.multiply(right)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
INT -> when (rightType) {
|
||||
INT -> when (name) {
|
||||
@@ -584,6 +596,7 @@ fun checkBinaryOp(
|
||||
"rem" -> return left.rem(right)
|
||||
"times" -> return left.multiply(right)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
LONG -> when (rightType) {
|
||||
LONG -> when (name) {
|
||||
@@ -617,6 +630,7 @@ fun checkBinaryOp(
|
||||
"rem" -> return left.rem(right)
|
||||
"times" -> return left.multiply(right)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
SHORT -> when (rightType) {
|
||||
BYTE -> when (name) {
|
||||
@@ -647,7 +661,9 @@ fun checkBinaryOp(
|
||||
"rem" -> return left.rem(right)
|
||||
"times" -> return left.multiply(right)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ fun getExpectedTypePredicate(
|
||||
}
|
||||
}
|
||||
|
||||
is MagicInstruction -> @Suppress("NON_EXHAUSTIVE_WHEN") when (it.kind) {
|
||||
is MagicInstruction -> when (it.kind) {
|
||||
AND, OR ->
|
||||
addSubtypesOf(builtIns.booleanType)
|
||||
|
||||
@@ -219,6 +219,7 @@ fun getExpectedTypePredicate(
|
||||
val typePredicate = getTypePredicateForUnresolvedCallArgument(it.element, it.inputValues.indexOf(value))
|
||||
typePredicates.add(typePredicate)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -297,4 +298,4 @@ fun Pseudocode.getPseudocodeByElement(element: KtElement): Pseudocode? {
|
||||
}
|
||||
|
||||
val Label.isJumpToError: Boolean
|
||||
get() = resolveToInstruction() == pseudocode.errorInstruction
|
||||
get() = resolveToInstruction() == pseudocode.errorInstruction
|
||||
|
||||
+1
@@ -87,6 +87,7 @@ class ResolvedAtomCompleter(
|
||||
is ResolvedCallAtom -> completeResolvedCall(resolvedAtom, emptyList())
|
||||
is ResolvedSubCallArgument -> completeSubCallArgument(resolvedAtom)
|
||||
is ResolvedExpressionAtom -> completeExpression(resolvedAtom)
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -441,4 +441,4 @@ internal class ComparableRangeToHandler(context: CommonBackendContext) : HeaderI
|
||||
start = expression.extensionReceiver!!,
|
||||
endInclusive = expression.getValueArgument(0)!!
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ fun lowerPreservingIcData(module: IrModuleFragment, context: JsIrBackendContext,
|
||||
lowering.declarationTransformer(context).lower(module)
|
||||
is BodyLowering ->
|
||||
lowering.bodyLowering(context).lower(module)
|
||||
// else -> TODO what about other lowerings?
|
||||
is ModuleLowering -> { /*TODO what about other lowerings? */ }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -317,6 +317,7 @@ open class IrFileSerializer(
|
||||
is IdSignature.LoweredDeclarationSignature -> proto.icSig = serializeLoweredDeclarationSignature(idSignature)
|
||||
is IdSignature.GlobalFileLocalSignature -> proto.privateSig = serializePrivateSignature(idSignature)
|
||||
is IdSignature.GlobalScopeLocalDeclaration -> proto.externalScopedLocalSig = serializeScopeLocalSignature(idSignature)
|
||||
is IdSignature.SpecialFakeOverrideSignature -> {}
|
||||
}
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
+1
@@ -162,6 +162,7 @@ private class NoExplicitReceiverScopeTowerProcessor<C : Candidate>(
|
||||
is TowerData.TowerLevel -> data.level.recordLookup(name)
|
||||
is TowerData.BothTowerLevelAndImplicitReceiver -> data.level.recordLookup(name)
|
||||
is TowerData.ForLookupForNoExplicitReceiver -> data.level.recordLookup(name)
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -202,6 +202,7 @@ private fun ClassifierDescriptor.enhanceMutability(
|
||||
return mapper.convertReadOnlyToMutable(this).enhancedMutability()
|
||||
}
|
||||
}
|
||||
null -> {}
|
||||
}
|
||||
|
||||
return this.noChange()
|
||||
|
||||
@@ -27,7 +27,7 @@ fun generate(): String {
|
||||
val sb = StringBuilder()
|
||||
val p = Printer(sb)
|
||||
p.println(File("license/COPYRIGHT_HEADER.txt").readText())
|
||||
p.println("@file:Suppress(\"DEPRECATION\", \"DEPRECATION_ERROR\", \"NON_EXHAUSTIVE_WHEN\")")
|
||||
p.println("@file:Suppress(\"DEPRECATION\", \"DEPRECATION_ERROR\")")
|
||||
|
||||
p.println()
|
||||
p.println("package org.jetbrains.kotlin.resolve.constants.evaluate")
|
||||
@@ -99,6 +99,7 @@ fun generate(): String {
|
||||
p.popIndent()
|
||||
p.println("}")
|
||||
}
|
||||
p.println("else -> {}")
|
||||
p.popIndent()
|
||||
p.println("}")
|
||||
p.println("return null")
|
||||
@@ -123,9 +124,11 @@ fun generate(): String {
|
||||
p.popIndent()
|
||||
p.println("}")
|
||||
}
|
||||
p.println("else -> {}")
|
||||
p.popIndent()
|
||||
p.println("}")
|
||||
}
|
||||
p.println("else -> {}")
|
||||
p.popIndent()
|
||||
p.println("}")
|
||||
p.println("return null")
|
||||
@@ -154,9 +157,11 @@ fun generate(): String {
|
||||
p.popIndent()
|
||||
p.println("}")
|
||||
}
|
||||
p.println("else -> {}")
|
||||
p.popIndent()
|
||||
p.println("}")
|
||||
}
|
||||
p.println("else -> {}")
|
||||
p.popIndent()
|
||||
p.println("}")
|
||||
p.println("return null")
|
||||
|
||||
@@ -97,6 +97,7 @@ class DeadCodeElimination(
|
||||
val remapper = SourceMapLocationRemapper(sourceMap)
|
||||
statements.forEach { remapper.remap(it) }
|
||||
}
|
||||
null -> {}
|
||||
}
|
||||
block.statements += statements
|
||||
file.moduleName?.let { dce.moduleMapping[block] = it }
|
||||
|
||||
@@ -65,12 +65,14 @@ class InlinerCycleReporter(
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
when (functionVisitingState[definition.function]) {
|
||||
VisitedState.IN_PROCESS -> {
|
||||
reportInlineCycle(call, definition.function)
|
||||
return
|
||||
}
|
||||
VisitedState.PROCESSED -> return
|
||||
null -> {}
|
||||
}
|
||||
|
||||
functionVisitingState[function] = VisitedState.IN_PROCESS
|
||||
|
||||
@@ -55,6 +55,7 @@ class BasicJvmReplEvaluator(val scriptEvaluator: ScriptEvaluator = BasicJvmScrip
|
||||
when (retVal) {
|
||||
is ResultValue.Error -> history.add(retVal.scriptClass, null)
|
||||
is ResultValue.Value, is ResultValue.Unit -> history.add(retVal.scriptClass, retVal.scriptInstance)
|
||||
is ResultValue.NotEvaluated -> {}
|
||||
}
|
||||
KJvmEvaluatedSnippet(snippetVal, currentConfiguration, retVal)
|
||||
}
|
||||
|
||||
+2
-1
@@ -315,6 +315,7 @@ class NewMultiplatformIT : BaseGradleIT() {
|
||||
IR -> {
|
||||
groupDir.resolve(jsJarName).exists()
|
||||
}
|
||||
BOTH -> {}
|
||||
}
|
||||
|
||||
val metadataJarEntries = ZipFile(groupDir.resolve(metadataJarName)).entries().asSequence().map { it.name }.toSet()
|
||||
@@ -1846,4 +1847,4 @@ class NewMultiplatformIT : BaseGradleIT() {
|
||||
HostManager.hostIsMac -> "macosX64"
|
||||
else -> throw AssertionError("Host ${HostManager.host} is not supported for this test")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ class WasmIrToBinary(outputStream: OutputStream, val module: WasmModule) {
|
||||
when (it) {
|
||||
is WasmStructDeclaration -> appendStructTypeDeclaration(it)
|
||||
is WasmArrayDeclaration -> appendArrayTypeDeclaration(it)
|
||||
is WasmFunctionType -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,11 +130,9 @@ data class SpecTest(
|
||||
|
||||
private fun runSpecTest(specTest: SpecTest, testDir: File, wastFile: File, wabtOptions: List<String>) {
|
||||
for (command in specTest.commands) {
|
||||
when (command) {
|
||||
is SpecTest.Command.Module -> {
|
||||
val wasmFile = File(testDir, command.filename)
|
||||
testWasmFile(wasmFile, testDir.name)
|
||||
}
|
||||
if (command is SpecTest.Command.Module) {
|
||||
val wasmFile = File(testDir, command.filename)
|
||||
testWasmFile(wasmFile, testDir.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user