From 86ece5e40e071596881b68674d1e01d3d40dc7fc Mon Sep 17 00:00:00 2001 From: Nicolas Farabegoli Date: Thu, 9 Jan 2025 13:02:00 +0100 Subject: [PATCH] fix: use appropriate warning type preventing error inside Intellij `java.lang.NoClassDefFoundError: org/jetbrains/kotlin/com/intellij/psi/PsiElement` (#684) --- .../collektive/frontend/checkers/FirCollektiveErrors.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/compiler-plugin/src/main/kotlin/it/unibo/collektive/frontend/checkers/FirCollektiveErrors.kt b/compiler-plugin/src/main/kotlin/it/unibo/collektive/frontend/checkers/FirCollektiveErrors.kt index be583fd67..28f3c171a 100644 --- a/compiler-plugin/src/main/kotlin/it/unibo/collektive/frontend/checkers/FirCollektiveErrors.kt +++ b/compiler-plugin/src/main/kotlin/it/unibo/collektive/frontend/checkers/FirCollektiveErrors.kt @@ -8,10 +8,9 @@ package it.unibo.collektive.frontend.checkers -import org.jetbrains.kotlin.com.intellij.psi.PsiElement -import org.jetbrains.kotlin.diagnostics.SourceElementPositioningStrategies.CALL_ELEMENT_WITH_DOT import org.jetbrains.kotlin.diagnostics.rendering.RootDiagnosticRendererFactory import org.jetbrains.kotlin.diagnostics.warning1 +import org.jetbrains.kotlin.psi.KtNameReferenceExpression /** * Error messages for the Collektive compiler plugin. @@ -20,18 +19,18 @@ object FirCollektiveErrors { /** * Warning raised when a forbidden function is called. */ - val FORBIDDEN_FUNCTION_CALL by warning1(CALL_ELEMENT_WITH_DOT) + val FORBIDDEN_FUNCTION_CALL by warning1() /** * Warning raised when an aggregate function is called inside an iteration construct. */ - val AGGREGATE_FUNCTION_INSIDE_ITERATION by warning1(CALL_ELEMENT_WITH_DOT) + val AGGREGATE_FUNCTION_INSIDE_ITERATION by warning1() /** * Warning raised when a function that has an aggregate parameter and uses it for making aggregate calls * is called inside an iteration construct. */ - val FUNCTION_WITH_AGGREGATE_PARAMETER_INSIDE_ITERATION by warning1(CALL_ELEMENT_WITH_DOT) + val FUNCTION_WITH_AGGREGATE_PARAMETER_INSIDE_ITERATION by warning1() init { RootDiagnosticRendererFactory.registerFactory(KtDefaultErrorMessagesCollektive)