Skip to content

Commit

Permalink
Improve reporter error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipDolnik committed May 16, 2024
1 parent dc7c98a commit 0ef126d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import org.jetbrains.kotlin.cli.jvm.compiler.report
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import org.jetbrains.kotlin.js.resolve.diagnostics.findPsi
import org.jetbrains.kotlin.renderer.DescriptorRenderer
import org.jetbrains.kotlin.resolve.descriptorUtil.module

object ProcessReportedMessagesPhase : LinkPhase {

Expand Down Expand Up @@ -43,7 +44,7 @@ object ProcessReportedMessagesPhase : LinkPhase {
}

val message = if (declaration != null && location == null) {
"${report.message}\n (at ${DescriptorRenderer.COMPACT_WITH_SHORT_TYPES.render(declaration)})"
"${report.message}\n (at ${DescriptorRenderer.COMPACT.render(declaration)} from module ${declaration.module.name})"
} else {
report.message
}
Expand Down

0 comments on commit 0ef126d

Please sign in to comment.