From 43eef23b67069d89018c1d131e000d651542020e Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 30 Oct 2020 13:02:07 +0800 Subject: [PATCH] Fix StringConstant --- .../mirai-console/src/command/descriptor/CommandParameter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/mirai-console/src/command/descriptor/CommandParameter.kt b/backend/mirai-console/src/command/descriptor/CommandParameter.kt index e6d30d783..225615447 100644 --- a/backend/mirai-console/src/command/descriptor/CommandParameter.kt +++ b/backend/mirai-console/src/command/descriptor/CommandParameter.kt @@ -186,7 +186,7 @@ public sealed class AbstractCommandValueParameter : CommandValueParameter, override fun toString(): String = "<$expectingValue>" override fun acceptingImpl(expectingType: KType, argument: CommandValueArgument, commandArgumentContext: CommandArgumentContext?): ArgumentAcceptance { - return if (argument.type.isSubtypeOf(expectingType) && argument.value.content == expectingValue) { + return if (argument.value.content == expectingValue) { ArgumentAcceptance.Direct } else ArgumentAcceptance.Impossible }