Skip to content

Commit

Permalink
[Compiler plugin] exception should not be caught to be visible in tes…
Browse files Browse the repository at this point in the history
…ts failure messages
  • Loading branch information
koperagen committed Jul 16, 2024
1 parent d4db00c commit c5c02b9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ fun <T> KotlinTypeFacade.interpret(
.filterNot { it.name.startsWith("typeArg") }
.associateBy { it.name }.toSortedMap().minus(additionalArguments.keys)

if (expectedArgsMap.keys - defaultArguments != actualArgsMap.keys - defaultArguments) {
val unexpectedArguments = expectedArgsMap.keys - defaultArguments != actualArgsMap.keys - defaultArguments
if (unexpectedArguments) {
val message = buildString {
appendLine("ERROR: Different set of arguments")
appendLine("Implementation class: $processor")
Expand All @@ -105,8 +106,7 @@ fun <T> KotlinTypeFacade.interpret(
appendLine("add arguments to an interpeter:")
appendLine(diff.map { actualArgsMap[it] })
}
reporter.reportInterpretationError(functionCall, message)
return null
interpretationFrameworkError(message)
}

val arguments = mutableMapOf<String, Interpreter.Success<Any?>>()
Expand Down

0 comments on commit c5c02b9

Please sign in to comment.