JVM: remove diagnostics related to JVM target 1.6
This commit is contained in:
committed by
Space Team
parent
e4e1bcefbd
commit
75197d1b86
-37
@@ -4620,13 +4620,6 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.JVM_DEFAULT_IN_JVM6_TARGET) { firDiagnostic ->
|
||||
JvmDefaultInJvm6TargetImpl(
|
||||
firDiagnostic.a,
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.JVM_DEFAULT_IN_DECLARATION) { firDiagnostic ->
|
||||
JvmDefaultInDeclarationImpl(
|
||||
firDiagnostic.a,
|
||||
@@ -4676,12 +4669,6 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.REPEATED_ANNOTATION_TARGET6) { firDiagnostic ->
|
||||
RepeatedAnnotationTarget6Impl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.REPEATED_ANNOTATION_WITH_CONTAINER) { firDiagnostic ->
|
||||
RepeatedAnnotationWithContainerImpl(
|
||||
firDiagnostic.a,
|
||||
@@ -4797,30 +4784,6 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET.errorFactory) { firDiagnostic ->
|
||||
DefaultMethodCallFromJava6TargetErrorImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET.warningFactory) { firDiagnostic ->
|
||||
DefaultMethodCallFromJava6TargetWarningImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET.errorFactory) { firDiagnostic ->
|
||||
InterfaceStaticMethodCallFromJava6TargetErrorImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET.warningFactory) { firDiagnostic ->
|
||||
InterfaceStaticMethodCallFromJava6TargetWarningImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC) { firDiagnostic ->
|
||||
SubclassCantCallCompanionProtectedNonStaticImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
-25
@@ -3216,11 +3216,6 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = IllegalJavaLangRecordSupertype::class
|
||||
}
|
||||
|
||||
abstract class JvmDefaultInJvm6Target : KtFirDiagnostic<PsiElement>() {
|
||||
override val diagnosticClass get() = JvmDefaultInJvm6Target::class
|
||||
abstract val annotation: String
|
||||
}
|
||||
|
||||
abstract class JvmDefaultInDeclaration : KtFirDiagnostic<KtElement>() {
|
||||
override val diagnosticClass get() = JvmDefaultInDeclaration::class
|
||||
abstract val annotation: String
|
||||
@@ -3254,10 +3249,6 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = NonSourceRepeatedAnnotation::class
|
||||
}
|
||||
|
||||
abstract class RepeatedAnnotationTarget6 : KtFirDiagnostic<KtAnnotationEntry>() {
|
||||
override val diagnosticClass get() = RepeatedAnnotationTarget6::class
|
||||
}
|
||||
|
||||
abstract class RepeatedAnnotationWithContainer : KtFirDiagnostic<KtAnnotationEntry>() {
|
||||
override val diagnosticClass get() = RepeatedAnnotationWithContainer::class
|
||||
abstract val name: ClassId
|
||||
@@ -3343,22 +3334,6 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = JvmSyntheticOnDelegate::class
|
||||
}
|
||||
|
||||
abstract class DefaultMethodCallFromJava6TargetError : KtFirDiagnostic<PsiElement>() {
|
||||
override val diagnosticClass get() = DefaultMethodCallFromJava6TargetError::class
|
||||
}
|
||||
|
||||
abstract class DefaultMethodCallFromJava6TargetWarning : KtFirDiagnostic<PsiElement>() {
|
||||
override val diagnosticClass get() = DefaultMethodCallFromJava6TargetWarning::class
|
||||
}
|
||||
|
||||
abstract class InterfaceStaticMethodCallFromJava6TargetError : KtFirDiagnostic<PsiElement>() {
|
||||
override val diagnosticClass get() = InterfaceStaticMethodCallFromJava6TargetError::class
|
||||
}
|
||||
|
||||
abstract class InterfaceStaticMethodCallFromJava6TargetWarning : KtFirDiagnostic<PsiElement>() {
|
||||
override val diagnosticClass get() = InterfaceStaticMethodCallFromJava6TargetWarning::class
|
||||
}
|
||||
|
||||
abstract class SubclassCantCallCompanionProtectedNonStatic : KtFirDiagnostic<PsiElement>() {
|
||||
override val diagnosticClass get() = SubclassCantCallCompanionProtectedNonStatic::class
|
||||
}
|
||||
|
||||
-31
@@ -3887,12 +3887,6 @@ internal class IllegalJavaLangRecordSupertypeImpl(
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.IllegalJavaLangRecordSupertype(), KtAbstractFirDiagnostic<PsiElement>
|
||||
|
||||
internal class JvmDefaultInJvm6TargetImpl(
|
||||
override val annotation: String,
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.JvmDefaultInJvm6Target(), KtAbstractFirDiagnostic<PsiElement>
|
||||
|
||||
internal class JvmDefaultInDeclarationImpl(
|
||||
override val annotation: String,
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
@@ -3934,11 +3928,6 @@ internal class NonSourceRepeatedAnnotationImpl(
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.NonSourceRepeatedAnnotation(), KtAbstractFirDiagnostic<KtAnnotationEntry>
|
||||
|
||||
internal class RepeatedAnnotationTarget6Impl(
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.RepeatedAnnotationTarget6(), KtAbstractFirDiagnostic<KtAnnotationEntry>
|
||||
|
||||
internal class RepeatedAnnotationWithContainerImpl(
|
||||
override val name: ClassId,
|
||||
override val explicitContainerName: ClassId,
|
||||
@@ -4039,26 +4028,6 @@ internal class JvmSyntheticOnDelegateImpl(
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.JvmSyntheticOnDelegate(), KtAbstractFirDiagnostic<KtAnnotationEntry>
|
||||
|
||||
internal class DefaultMethodCallFromJava6TargetErrorImpl(
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.DefaultMethodCallFromJava6TargetError(), KtAbstractFirDiagnostic<PsiElement>
|
||||
|
||||
internal class DefaultMethodCallFromJava6TargetWarningImpl(
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.DefaultMethodCallFromJava6TargetWarning(), KtAbstractFirDiagnostic<PsiElement>
|
||||
|
||||
internal class InterfaceStaticMethodCallFromJava6TargetErrorImpl(
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.InterfaceStaticMethodCallFromJava6TargetError(), KtAbstractFirDiagnostic<PsiElement>
|
||||
|
||||
internal class InterfaceStaticMethodCallFromJava6TargetWarningImpl(
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.InterfaceStaticMethodCallFromJava6TargetWarning(), KtAbstractFirDiagnostic<PsiElement>
|
||||
|
||||
internal class SubclassCantCallCompanionProtectedNonStaticImpl(
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: KtLifetimeToken,
|
||||
|
||||
-12
@@ -108,9 +108,6 @@ object JVM_DIAGNOSTICS_LIST : DiagnosticList("FirJvmErrors") {
|
||||
}
|
||||
|
||||
val JVM_DEFAULT by object : DiagnosticGroup("JVM Default") {
|
||||
val JVM_DEFAULT_IN_JVM6_TARGET by error<PsiElement> {
|
||||
parameter<String>("annotation")
|
||||
}
|
||||
val JVM_DEFAULT_IN_DECLARATION by error<KtElement>(PositioningStrategy.DECLARATION_SIGNATURE_OR_DEFAULT) {
|
||||
parameter<String>("annotation")
|
||||
}
|
||||
@@ -127,7 +124,6 @@ object JVM_DIAGNOSTICS_LIST : DiagnosticList("FirJvmErrors") {
|
||||
|
||||
val REPEATABLE by object : DiagnosticGroup("Repeatable Annotations") {
|
||||
val NON_SOURCE_REPEATED_ANNOTATION by error<KtAnnotationEntry>()
|
||||
val REPEATED_ANNOTATION_TARGET6 by error<KtAnnotationEntry>()
|
||||
val REPEATED_ANNOTATION_WITH_CONTAINER by error<KtAnnotationEntry> {
|
||||
parameter<ClassId>("name")
|
||||
parameter<ClassId>("explicitContainerName")
|
||||
@@ -170,14 +166,6 @@ object JVM_DIAGNOSTICS_LIST : DiagnosticList("FirJvmErrors") {
|
||||
parameter<String>("message")
|
||||
}
|
||||
val JVM_SYNTHETIC_ON_DELEGATE by error<KtAnnotationEntry>()
|
||||
val DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET by deprecationError<PsiElement>(
|
||||
DefaultMethodsCallFromJava6TargetError,
|
||||
PositioningStrategy.REFERENCE_BY_QUALIFIED
|
||||
)
|
||||
val INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET by deprecationError<PsiElement>(
|
||||
DefaultMethodsCallFromJava6TargetError,
|
||||
PositioningStrategy.REFERENCE_BY_QUALIFIED
|
||||
)
|
||||
val SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC by error<PsiElement>(PositioningStrategy.REFERENCED_NAME_BY_QUALIFIED)
|
||||
val CONCURRENT_HASH_MAP_CONTAINS_OPERATOR by deprecationError<PsiElement>(ProhibitConcurrentHashMapContains)
|
||||
val SPREAD_ON_SIGNATURE_POLYMORPHIC_CALL by deprecationError<PsiElement>(
|
||||
|
||||
-5
@@ -6,7 +6,6 @@
|
||||
package org.jetbrains.kotlin.fir.analysis.diagnostics.jvm
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.config.LanguageFeature.DefaultMethodsCallFromJava6TargetError
|
||||
import org.jetbrains.kotlin.config.LanguageFeature.ProhibitConcurrentHashMapContains
|
||||
import org.jetbrains.kotlin.config.LanguageFeature.ProhibitJvmOverloadsOnConstructorsOfAnnotationClasses
|
||||
import org.jetbrains.kotlin.config.LanguageFeature.ProhibitSpreadOnSignaturePolymorphicCall
|
||||
@@ -90,7 +89,6 @@ object FirJvmErrors {
|
||||
val ILLEGAL_JAVA_LANG_RECORD_SUPERTYPE by error0<PsiElement>()
|
||||
|
||||
// JVM Default
|
||||
val JVM_DEFAULT_IN_JVM6_TARGET by error1<PsiElement, String>()
|
||||
val JVM_DEFAULT_IN_DECLARATION by error1<KtElement, String>(SourceElementPositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT)
|
||||
val JVM_DEFAULT_WITH_COMPATIBILITY_IN_DECLARATION by error0<KtElement>()
|
||||
val JVM_DEFAULT_WITH_COMPATIBILITY_NOT_ON_INTERFACE by error0<KtElement>()
|
||||
@@ -103,7 +101,6 @@ object FirJvmErrors {
|
||||
|
||||
// Repeatable Annotations
|
||||
val NON_SOURCE_REPEATED_ANNOTATION by error0<KtAnnotationEntry>()
|
||||
val REPEATED_ANNOTATION_TARGET6 by error0<KtAnnotationEntry>()
|
||||
val REPEATED_ANNOTATION_WITH_CONTAINER by error2<KtAnnotationEntry, ClassId, ClassId>()
|
||||
val REPEATABLE_CONTAINER_MUST_HAVE_VALUE_ARRAY by deprecationError2<KtAnnotationEntry, ClassId, ClassId>(RepeatableAnnotationContainerConstraints)
|
||||
val REPEATABLE_CONTAINER_HAS_NON_DEFAULT_PARAMETER by deprecationError2<KtAnnotationEntry, ClassId, Name>(RepeatableAnnotationContainerConstraints)
|
||||
@@ -118,8 +115,6 @@ object FirJvmErrors {
|
||||
val INAPPLICABLE_JVM_FIELD by error1<KtAnnotationEntry, String>()
|
||||
val INAPPLICABLE_JVM_FIELD_WARNING by warning1<KtAnnotationEntry, String>()
|
||||
val JVM_SYNTHETIC_ON_DELEGATE by error0<KtAnnotationEntry>()
|
||||
val DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET by deprecationError0<PsiElement>(DefaultMethodsCallFromJava6TargetError, SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED)
|
||||
val INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET by deprecationError0<PsiElement>(DefaultMethodsCallFromJava6TargetError, SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED)
|
||||
val SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC by error0<PsiElement>(SourceElementPositioningStrategies.REFERENCED_NAME_BY_QUALIFIED)
|
||||
val CONCURRENT_HASH_MAP_CONTAINS_OPERATOR by deprecationError0<PsiElement>(ProhibitConcurrentHashMapContains)
|
||||
val SPREAD_ON_SIGNATURE_POLYMORPHIC_CALL by deprecationError0<PsiElement>(ProhibitSpreadOnSignaturePolymorphicCall, SourceElementPositioningStrategies.SPREAD_OPERATOR)
|
||||
|
||||
-21
@@ -13,7 +13,6 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.REND
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.SYMBOL
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.CONCURRENT_HASH_MAP_CONTAINS_OPERATOR
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.CONFLICTING_JVM_DECLARATIONS
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.DELEGATION_BY_IN_JVM_RECORD
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.DEPRECATED_JAVA_ANNOTATION
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.ENUM_JVM_RECORD
|
||||
@@ -30,11 +29,9 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.INAPPLICAB
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.INAPPLICABLE_JVM_NAME
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.INNER_JVM_RECORD
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.INTERFACE_CANT_CALL_DEFAULT_METHOD_VIA_SUPER
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.JAVA_SAM_INTERFACE_CONSTRUCTOR_REFERENCE
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.JAVA_TYPE_MISMATCH
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.JVM_DEFAULT_IN_DECLARATION
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.JVM_DEFAULT_IN_JVM6_TARGET
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.JVM_DEFAULT_WITH_COMPATIBILITY_IN_DECLARATION
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.JVM_DEFAULT_WITH_COMPATIBILITY_NOT_ON_INTERFACE
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.JVM_INLINE_WITHOUT_VALUE_CLASS
|
||||
@@ -69,7 +66,6 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.REPEATABLE
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.REPEATABLE_CONTAINER_HAS_SHORTER_RETENTION
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.REPEATABLE_CONTAINER_MUST_HAVE_VALUE_ARRAY
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.REPEATABLE_CONTAINER_TARGET_SET_NOT_A_SUBSET
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.REPEATED_ANNOTATION_TARGET6
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.REPEATED_ANNOTATION_WITH_CONTAINER
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.SPREAD_ON_SIGNATURE_POLYMORPHIC_CALL
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors.STRICTFP_ON_CLASS
|
||||
@@ -166,11 +162,6 @@ object FirJvmErrorsDefaultMessages : BaseDiagnosticRendererFactory() {
|
||||
map.put(VALUE_CLASS_WITHOUT_JVM_INLINE_ANNOTATION, "Value classes without @JvmInline annotation are not supported yet")
|
||||
map.put(JVM_INLINE_WITHOUT_VALUE_CLASS, "@JvmInline annotation is only applicable to value classes")
|
||||
|
||||
map.put(
|
||||
JVM_DEFAULT_IN_JVM6_TARGET,
|
||||
"''@{0}'' is only supported since JVM target 1.8. Recompile with ''-jvm-target 1.8''",
|
||||
STRING
|
||||
)
|
||||
map.put(JVM_DEFAULT_IN_DECLARATION, "Usage of ''@{0}'' is only allowed with -Xjvm-default option", STRING)
|
||||
map.put(
|
||||
JVM_DEFAULT_WITH_COMPATIBILITY_IN_DECLARATION,
|
||||
@@ -195,10 +186,6 @@ object FirJvmErrorsDefaultMessages : BaseDiagnosticRendererFactory() {
|
||||
NON_SOURCE_REPEATED_ANNOTATION,
|
||||
"Repeatable annotations with non-SOURCE retention are only supported starting from Kotlin 1.6"
|
||||
)
|
||||
map.put(
|
||||
REPEATED_ANNOTATION_TARGET6,
|
||||
"Repeatable annotations with non-SOURCE retention are not supported with JVM target 1.6. Use -jvm-target 1.8"
|
||||
)
|
||||
map.put(
|
||||
REPEATED_ANNOTATION_WITH_CONTAINER,
|
||||
"Repeated annotation ''@{0}'' cannot be used on a declaration which is annotated with its container annotation ''@{1}''",
|
||||
@@ -206,14 +193,6 @@ object FirJvmErrorsDefaultMessages : BaseDiagnosticRendererFactory() {
|
||||
TO_STRING
|
||||
)
|
||||
|
||||
map.put(
|
||||
DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET,
|
||||
"Super calls to Java default methods are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8'"
|
||||
)
|
||||
map.put(
|
||||
INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET,
|
||||
"Calls to static methods in Java interfaces are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8'"
|
||||
)
|
||||
map.put(
|
||||
INTERFACE_CANT_CALL_DEFAULT_METHOD_VIA_SUPER,
|
||||
"Interfaces can call JVM-default members via super only within JVM-default members. Please use '-Xjvm-default=all/all-compatibility' modes for such calls"
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.fir.analysis.jvm.checkers
|
||||
|
||||
import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext
|
||||
import org.jetbrains.kotlin.fir.moduleData
|
||||
|
||||
fun CheckerContext.isJvm6(): Boolean {
|
||||
return session.moduleData.platform.componentPlatforms.any { it.targetName == "1.6" }
|
||||
}
|
||||
+3
-29
@@ -11,7 +11,6 @@ import org.jetbrains.kotlin.diagnostics.reportOn
|
||||
import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext
|
||||
import org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirBasicDeclarationChecker
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors
|
||||
import org.jetbrains.kotlin.fir.analysis.jvm.checkers.isJvm6
|
||||
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
||||
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||
import org.jetbrains.kotlin.fir.declarations.getAnnotationByClassId
|
||||
@@ -27,40 +26,15 @@ object FirJvmDefaultChecker : FirBasicDeclarationChecker() {
|
||||
val annotationNoCompatibility = declaration.getAnnotationByClassId(JVM_DEFAULT_NO_COMPATIBILITY_CLASS_ID, session)
|
||||
if (annotationNoCompatibility != null) {
|
||||
val source = annotationNoCompatibility.source
|
||||
when {
|
||||
context.isJvm6() -> {
|
||||
reporter.reportOn(
|
||||
source,
|
||||
FirJvmErrors.JVM_DEFAULT_IN_JVM6_TARGET,
|
||||
"JvmDefaultWithoutCompatibility",
|
||||
context
|
||||
)
|
||||
return
|
||||
}
|
||||
jvmDefaultMode?.isEnabled != true -> {
|
||||
reporter.reportOn(
|
||||
source,
|
||||
FirJvmErrors.JVM_DEFAULT_IN_DECLARATION,
|
||||
"JvmDefaultWithoutCompatibility",
|
||||
context
|
||||
)
|
||||
return
|
||||
}
|
||||
if (jvmDefaultMode?.isEnabled != true) {
|
||||
reporter.reportOn(source, FirJvmErrors.JVM_DEFAULT_IN_DECLARATION, "JvmDefaultWithoutCompatibility", context)
|
||||
return
|
||||
}
|
||||
}
|
||||
val annotationWithCompatibility = declaration.getAnnotationByClassId(JVM_DEFAULT_WITH_COMPATIBILITY_CLASS_ID, session)
|
||||
if (annotationWithCompatibility != null) {
|
||||
val source = annotationWithCompatibility.source
|
||||
when {
|
||||
context.isJvm6() -> {
|
||||
reporter.reportOn(
|
||||
source,
|
||||
FirJvmErrors.JVM_DEFAULT_IN_JVM6_TARGET,
|
||||
"JvmDefaultWithCompatibility",
|
||||
context
|
||||
)
|
||||
return
|
||||
}
|
||||
jvmDefaultMode != JvmDefaultMode.ALL_INCOMPATIBLE -> {
|
||||
reporter.reportOn(source, FirJvmErrors.JVM_DEFAULT_WITH_COMPATIBILITY_IN_DECLARATION, context)
|
||||
return
|
||||
|
||||
+2
-6
@@ -19,7 +19,6 @@ import org.jetbrains.kotlin.fir.analysis.checkers.getAllowedAnnotationTargets
|
||||
import org.jetbrains.kotlin.fir.analysis.checkers.getAnnotationRetention
|
||||
import org.jetbrains.kotlin.fir.analysis.checkers.unsubstitutedScope
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors
|
||||
import org.jetbrains.kotlin.fir.analysis.jvm.checkers.isJvm6
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.classId
|
||||
import org.jetbrains.kotlin.fir.expressions.*
|
||||
@@ -62,12 +61,9 @@ object FirRepeatableAnnotationChecker : FirBasicDeclarationChecker() {
|
||||
annotationClass.containsRepeatableAnnotation(session) &&
|
||||
annotationClass.getAnnotationRetention(session) != AnnotationRetention.SOURCE
|
||||
) {
|
||||
if (context.isJvm6()) {
|
||||
reporter.reportOn(annotation.source, FirJvmErrors.REPEATED_ANNOTATION_TARGET6, context)
|
||||
} else if (session.languageVersionSettings.supportsFeature(LanguageFeature.RepeatableAnnotations)) {
|
||||
if (session.languageVersionSettings.supportsFeature(LanguageFeature.RepeatableAnnotations)) {
|
||||
// It's not allowed to have both a repeated annotation (applied more than once) and its container
|
||||
// on the same element.
|
||||
// See https://docs.oracle.com/javase/specs/jls/se16/html/jls-9.html#jls-9.7.5.
|
||||
// on the same element. See https://docs.oracle.com/javase/specs/jls/se16/html/jls-9.html#jls-9.7.5.
|
||||
val explicitContainer = annotationClass.resolveContainerAnnotation(session)
|
||||
if (explicitContainer != null && annotations.any { it.toAnnotationClassId(session) == explicitContainer }) {
|
||||
reporter.reportOn(
|
||||
|
||||
+3
-22
@@ -13,13 +13,11 @@ import org.jetbrains.kotlin.fir.analysis.checkers.explicitReceiverIsNotSuperRefe
|
||||
import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirQualifiedAccessExpressionChecker
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors
|
||||
import org.jetbrains.kotlin.fir.analysis.jvm.checkers.isCompiledToJvmDefault
|
||||
import org.jetbrains.kotlin.fir.analysis.jvm.checkers.isJvm6
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.isInterface
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.isStatic
|
||||
import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression
|
||||
import org.jetbrains.kotlin.fir.references.toResolvedCallableSymbol
|
||||
import org.jetbrains.kotlin.fir.java.jvmDefaultModeState
|
||||
import org.jetbrains.kotlin.fir.references.toResolvedCallableSymbol
|
||||
import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.ANONYMOUS_CLASS_ID
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
|
||||
@@ -30,25 +28,12 @@ object FirInterfaceDefaultMethodCallChecker : FirQualifiedAccessExpressionChecke
|
||||
val classId = symbol?.callableId?.classId ?: return
|
||||
if (classId.isLocal) return
|
||||
|
||||
val session = context.session
|
||||
fun getTypeSymbol(): FirRegularClassSymbol? {
|
||||
return session.symbolProvider.getClassLikeSymbolByClassId(classId) as? FirRegularClassSymbol
|
||||
}
|
||||
|
||||
val supportsDefaults = !context.isJvm6()
|
||||
var typeSymbol: FirRegularClassSymbol? = null
|
||||
if (!supportsDefaults && symbol.isStatic) {
|
||||
typeSymbol = getTypeSymbol() ?: return
|
||||
if (typeSymbol.isInterface && typeSymbol.origin is FirDeclarationOrigin.Java) {
|
||||
reporter.reportOn(expression.source, FirJvmErrors.INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET, context)
|
||||
}
|
||||
}
|
||||
|
||||
if (expression.explicitReceiverIsNotSuperReference()) return
|
||||
|
||||
val containingDeclaration = context.findClosest<FirRegularClass>() ?: return
|
||||
|
||||
if (typeSymbol == null) typeSymbol = getTypeSymbol() ?: return
|
||||
val session = context.session
|
||||
val typeSymbol = session.symbolProvider.getClassLikeSymbolByClassId(classId) as? FirRegularClassSymbol ?: return
|
||||
|
||||
val jvmDefaultMode = session.jvmDefaultModeState
|
||||
if (typeSymbol.isInterface &&
|
||||
@@ -61,10 +46,6 @@ object FirInterfaceDefaultMethodCallChecker : FirQualifiedAccessExpressionChecke
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (!supportsDefaults) {
|
||||
reporter.reportOn(expression.source, FirJvmErrors.DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET, context)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-20
@@ -30,32 +30,22 @@ import org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
import org.jetbrains.kotlin.psi.KtProperty
|
||||
import org.jetbrains.kotlin.psi.KtSuperExpression
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils.*
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils.isInterface
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils.unwrapFakeOverride
|
||||
import org.jetbrains.kotlin.resolve.LanguageVersionSettingsProvider
|
||||
import org.jetbrains.kotlin.resolve.calls.util.getSuperCallExpression
|
||||
import org.jetbrains.kotlin.resolve.calls.checkers.CallChecker
|
||||
import org.jetbrains.kotlin.resolve.calls.checkers.CallCheckerContext
|
||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm.*
|
||||
|
||||
class InterfaceDefaultMethodCallChecker(val jvmTarget: JvmTarget, private val project: Project) : CallChecker {
|
||||
import org.jetbrains.kotlin.resolve.calls.util.getSuperCallExpression
|
||||
import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm.INTERFACE_CANT_CALL_DEFAULT_METHOD_VIA_SUPER
|
||||
|
||||
class InterfaceDefaultMethodCallChecker(val jvmTarget: JvmTarget, project: Project) : CallChecker {
|
||||
private val ideService = LanguageVersionSettingsProvider.getInstance(project)
|
||||
|
||||
override fun check(resolvedCall: ResolvedCall<*>, reportOn: PsiElement, context: CallCheckerContext) {
|
||||
val supportDefaults = jvmTarget >= JvmTarget.JVM_1_8
|
||||
|
||||
val descriptor = resolvedCall.resultingDescriptor as? CallableMemberDescriptor ?: return
|
||||
if (descriptor is JavaPropertyDescriptor) return
|
||||
|
||||
if (!supportDefaults &&
|
||||
isStaticDeclaration(descriptor) &&
|
||||
isInterface(descriptor.containingDeclaration) &&
|
||||
descriptor is JavaCallableMemberDescriptor) {
|
||||
context.trace.report(INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET.on(context.languageVersionSettings, reportOn))
|
||||
}
|
||||
|
||||
val superCallExpression = getSuperCallExpression(resolvedCall.call) ?: return
|
||||
|
||||
if (!isInterface(descriptor.original.containingDeclaration)) return
|
||||
@@ -70,17 +60,13 @@ class InterfaceDefaultMethodCallChecker(val jvmTarget: JvmTarget, private val pr
|
||||
val bindingContext = context.trace.bindingContext
|
||||
val thisForSuperCall = getSuperCallLabelTarget(bindingContext, superCallExpression)
|
||||
|
||||
if (thisForSuperCall != null && DescriptorUtils.isInterface(thisForSuperCall)) {
|
||||
if (thisForSuperCall != null && isInterface(thisForSuperCall)) {
|
||||
val declarationWithCall = findInterfaceMember(thisForSuperCall, superCallExpression, bindingContext)
|
||||
if (declarationWithCall?.isCompiledToJvmDefaultWithProperMode(ideService, jvmDefaultMode) == false) {
|
||||
context.trace.report(INTERFACE_CANT_CALL_DEFAULT_METHOD_VIA_SUPER.on(reportOn))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (!supportDefaults) {
|
||||
context.trace.report(DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET.on(context.languageVersionSettings, reportOn))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-8
@@ -109,10 +109,7 @@ class JvmDefaultChecker(private val jvmTarget: JvmTarget, project: Project) : De
|
||||
): Boolean {
|
||||
descriptor.annotations.findAnnotation(JVM_DEFAULT_NO_COMPATIBILITY_FQ_NAME)?.let { annotationDescriptor ->
|
||||
val reportOn = DescriptorToSourceUtils.getSourceFromAnnotation(annotationDescriptor) ?: declaration
|
||||
if (jvmTarget == JvmTarget.JVM_1_6) {
|
||||
context.trace.report(ErrorsJvm.JVM_DEFAULT_IN_JVM6_TARGET.on(reportOn, "JvmDefaultWithoutCompatibility"))
|
||||
return true
|
||||
} else if (!jvmDefaultMode.isEnabled) {
|
||||
if (!jvmDefaultMode.isEnabled) {
|
||||
context.trace.report(ErrorsJvm.JVM_DEFAULT_IN_DECLARATION.on(reportOn, "JvmDefaultWithoutCompatibility"))
|
||||
return true
|
||||
}
|
||||
@@ -120,10 +117,7 @@ class JvmDefaultChecker(private val jvmTarget: JvmTarget, project: Project) : De
|
||||
|
||||
descriptor.annotations.findAnnotation(JVM_DEFAULT_WITH_COMPATIBILITY_FQ_NAME)?.let { annotationDescriptor ->
|
||||
val reportOn = DescriptorToSourceUtils.getSourceFromAnnotation(annotationDescriptor) ?: declaration
|
||||
if (jvmTarget == JvmTarget.JVM_1_6) {
|
||||
context.trace.report(ErrorsJvm.JVM_DEFAULT_IN_JVM6_TARGET.on(reportOn, "JvmDefaultWithCompatibility"))
|
||||
return true
|
||||
} else if (jvmDefaultMode != JvmDefaultMode.ALL_INCOMPATIBLE) {
|
||||
if (jvmDefaultMode != JvmDefaultMode.ALL_INCOMPATIBLE) {
|
||||
context.trace.report(ErrorsJvm.JVM_DEFAULT_WITH_COMPATIBILITY_IN_DECLARATION.on(reportOn))
|
||||
return true
|
||||
} else if (!isInterface(descriptor)) {
|
||||
|
||||
+8
-14
@@ -132,21 +132,15 @@ class RepeatableAnnotationChecker(
|
||||
&& isRepeatableAnnotation(classDescriptor)
|
||||
&& classDescriptor.getAnnotationRetention() != KotlinRetention.SOURCE
|
||||
) {
|
||||
when {
|
||||
jvmTarget == JvmTarget.JVM_1_6 -> {
|
||||
trace.report(ErrorsJvm.REPEATED_ANNOTATION_TARGET6.on(entry))
|
||||
}
|
||||
languageVersionSettings.supportsFeature(LanguageFeature.RepeatableAnnotations) -> {
|
||||
// It's not allowed to have both a repeated annotation (applied more than once) and its container
|
||||
// on the same element. See https://docs.oracle.com/javase/specs/jls/se16/html/jls-9.html#jls-9.7.5.
|
||||
val explicitContainer = resolveContainerAnnotation(classDescriptor)
|
||||
if (explicitContainer != null && annotations.any { it.descriptor.fqName == explicitContainer }) {
|
||||
trace.report(ErrorsJvm.REPEATED_ANNOTATION_WITH_CONTAINER.on(entry, fqName, explicitContainer))
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
trace.report(ErrorsJvm.NON_SOURCE_REPEATED_ANNOTATION.on(entry))
|
||||
if (languageVersionSettings.supportsFeature(LanguageFeature.RepeatableAnnotations)) {
|
||||
// It's not allowed to have both a repeated annotation (applied more than once) and its container
|
||||
// on the same element. See https://docs.oracle.com/javase/specs/jls/se16/html/jls-9.html#jls-9.7.5.
|
||||
val explicitContainer = resolveContainerAnnotation(classDescriptor)
|
||||
if (explicitContainer != null && annotations.any { it.descriptor.fqName == explicitContainer }) {
|
||||
trace.report(ErrorsJvm.REPEATED_ANNOTATION_WITH_CONTAINER.on(entry, fqName, explicitContainer))
|
||||
}
|
||||
} else {
|
||||
trace.report(ErrorsJvm.NON_SOURCE_REPEATED_ANNOTATION.on(entry))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-8
@@ -17,7 +17,6 @@
|
||||
package org.jetbrains.kotlin.resolve.jvm.checkers
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.config.JvmTarget
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
@@ -25,7 +24,6 @@ import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor
|
||||
import org.jetbrains.kotlin.diagnostics.DiagnosticSink
|
||||
import org.jetbrains.kotlin.diagnostics.Errors
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.name.JvmNames.VOLATILE_ANNOTATION_FQ_NAME
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.resolve.DescriptorToSourceUtils
|
||||
@@ -58,9 +56,7 @@ class LocalFunInlineChecker : DeclarationChecker {
|
||||
}
|
||||
}
|
||||
|
||||
class JvmStaticChecker(jvmTarget: JvmTarget, languageVersionSettings: LanguageVersionSettings) : DeclarationChecker {
|
||||
private val isLessJVM18 = jvmTarget.majorVersion < JvmTarget.JVM_1_8.majorVersion
|
||||
|
||||
class JvmStaticChecker(languageVersionSettings: LanguageVersionSettings) : DeclarationChecker {
|
||||
private val supportJvmStaticInInterface = languageVersionSettings.supportsFeature(LanguageFeature.JvmStaticInInterface)
|
||||
|
||||
override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) {
|
||||
@@ -91,9 +87,6 @@ class JvmStaticChecker(jvmTarget: JvmTarget, languageVersionSettings: LanguageVe
|
||||
descriptor is DeclarationDescriptorWithVisibility
|
||||
) {
|
||||
checkForInterface(descriptor, diagnosticHolder, declaration)
|
||||
if (isLessJVM18) {
|
||||
diagnosticHolder.report(ErrorsJvm.JVM_STATIC_IN_INTERFACE_1_6.on(declaration))
|
||||
}
|
||||
} else {
|
||||
diagnosticHolder.report(
|
||||
(if (supportJvmStaticInInterface) ErrorsJvm.JVM_STATIC_NOT_IN_OBJECT_OR_COMPANION
|
||||
|
||||
-6
@@ -42,7 +42,6 @@ public class DefaultErrorMessagesJvm implements DefaultErrorMessages.Extension {
|
||||
MAP.put(JVM_STATIC_NOT_IN_OBJECT_OR_CLASS_COMPANION, "Only members in named objects and companion objects of classes can be annotated with '@JvmStatic'");
|
||||
MAP.put(JVM_STATIC_NOT_IN_OBJECT_OR_COMPANION, "Only members in named objects and companion objects can be annotated with '@JvmStatic'");
|
||||
MAP.put(JVM_STATIC_ON_NON_PUBLIC_MEMBER, "Only public members in interface companion objects can be annotated with '@JvmStatic'");
|
||||
MAP.put(JVM_STATIC_IN_INTERFACE_1_6, "'@JvmStatic' annotation in interface supported only with JVM target 1.8 and above. Recompile with '-jvm-target 1.8'\"");
|
||||
MAP.put(JVM_STATIC_ON_CONST_OR_JVM_FIELD, "'@JvmStatic' annotation is useless for const or '@JvmField' properties");
|
||||
MAP.put(JVM_STATIC_ON_EXTERNAL_IN_INTERFACE, "'@JvmStatic' annotation cannot be used on 'external' members of interface companions");
|
||||
MAP.put(OVERRIDE_CANNOT_BE_STATIC, "Override member cannot be '@JvmStatic' in object");
|
||||
@@ -69,7 +68,6 @@ public class DefaultErrorMessagesJvm implements DefaultErrorMessages.Extension {
|
||||
MAP.put(POSITIONED_VALUE_ARGUMENT_FOR_JAVA_ANNOTATION, "Only named arguments are available for Java annotations");
|
||||
MAP.put(DEPRECATED_JAVA_ANNOTATION, "This annotation is deprecated in Kotlin. Use ''@{0}'' instead", TO_STRING);
|
||||
MAP.put(NON_SOURCE_REPEATED_ANNOTATION, "Repeatable annotations with non-SOURCE retention are only supported starting from Kotlin 1.6");
|
||||
MAP.put(REPEATED_ANNOTATION_TARGET6, "Repeatable annotations with non-SOURCE retention are not supported with JVM target 1.6. Use -jvm-target 1.8");
|
||||
MAP.put(REPEATED_ANNOTATION_WITH_CONTAINER, "Repeated annotation ''@{0}'' cannot be used on a declaration which is annotated with its container annotation ''@{1}''", TO_STRING, TO_STRING);
|
||||
MAP.put(ANNOTATION_IS_NOT_APPLICABLE_TO_MULTIFILE_CLASSES, "Annotation ''@{0}'' is not applicable to the multi-file classes", TO_STRING);
|
||||
|
||||
@@ -153,9 +151,6 @@ public class DefaultErrorMessagesJvm implements DefaultErrorMessages.Extension {
|
||||
"Please make explicit overrides (abstract or concrete) for the following non-abstract members of ''{1}'': {2}",
|
||||
NAME, NAME, STRING);
|
||||
|
||||
MAP.put(DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET, "Super calls to Java default methods are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8'");
|
||||
MAP.put(INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET, "Calls to static methods in Java interfaces are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8'");
|
||||
|
||||
MAP.put(INLINE_FROM_HIGHER_PLATFORM, "Cannot inline bytecode built with {0} into bytecode that is being built with {1}. Please specify proper ''-jvm-target'' option", STRING, STRING);
|
||||
MAP.put(INLINE_FROM_HIGHER_PLATFORM_WARNING, "Cannot inline bytecode built with {0} into bytecode that is being built with {1}. Please specify proper ''-jvm-target'' option", STRING, STRING);
|
||||
|
||||
@@ -168,7 +163,6 @@ public class DefaultErrorMessagesJvm implements DefaultErrorMessages.Extension {
|
||||
MAP.put(ASSIGNMENT_TO_ARRAY_LOOP_VARIABLE, "Assignment to a for-in-array loop range variable. Behavior may change in Kotlin 1.3. " +
|
||||
"See https://youtrack.jetbrains.com/issue/KT-21354 for more details");
|
||||
|
||||
MAP.put(JVM_DEFAULT_IN_JVM6_TARGET,"''@{0}'' is only supported since JVM target 1.8. Recompile with ''-jvm-target 1.8''", STRING);
|
||||
MAP.put(JVM_DEFAULT_IN_DECLARATION, "Usage of ''@{0}'' is only allowed with -Xjvm-default option", STRING);
|
||||
MAP.put(JVM_DEFAULT_WITH_COMPATIBILITY_IN_DECLARATION, "Usage of '@JvmDefaultWithCompatibility' is only allowed with '-Xjvm-default=all' option");
|
||||
MAP.put(JVM_DEFAULT_WITH_COMPATIBILITY_NOT_ON_INTERFACE, "'@JvmDefaultWithCompatibility' annotation is only allowed on interfaces");
|
||||
|
||||
@@ -30,7 +30,6 @@ public interface ErrorsJvm {
|
||||
DiagnosticFactory0<KtDeclaration> JVM_STATIC_NOT_IN_OBJECT_OR_CLASS_COMPANION = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
|
||||
DiagnosticFactory0<KtDeclaration> JVM_STATIC_NOT_IN_OBJECT_OR_COMPANION = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
|
||||
DiagnosticFactory0<KtDeclaration> JVM_STATIC_ON_NON_PUBLIC_MEMBER = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
|
||||
DiagnosticFactory0<KtDeclaration> JVM_STATIC_IN_INTERFACE_1_6 = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
|
||||
DiagnosticFactory0<KtDeclaration> JVM_STATIC_ON_CONST_OR_JVM_FIELD = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
|
||||
DiagnosticFactory0<KtDeclaration> JVM_STATIC_ON_EXTERNAL_IN_INTERFACE = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
|
||||
|
||||
@@ -72,7 +71,6 @@ public interface ErrorsJvm {
|
||||
DiagnosticFactory1<KtAnnotationEntry, FqName> DEPRECATED_JAVA_ANNOTATION = DiagnosticFactory1.create(WARNING);
|
||||
|
||||
DiagnosticFactory0<KtAnnotationEntry> NON_SOURCE_REPEATED_ANNOTATION = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtAnnotationEntry> REPEATED_ANNOTATION_TARGET6 = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory2<KtAnnotationEntry, FqName, FqName> REPEATED_ANNOTATION_WITH_CONTAINER = DiagnosticFactory2.create(ERROR);
|
||||
|
||||
DiagnosticFactoryForDeprecation2<KtAnnotationEntry, FqName, FqName> REPEATABLE_CONTAINER_MUST_HAVE_VALUE_ARRAY =
|
||||
@@ -130,7 +128,6 @@ public interface ErrorsJvm {
|
||||
|
||||
DiagnosticFactory0<KtExpression> ASSIGNMENT_TO_ARRAY_LOOP_VARIABLE = DiagnosticFactory0.create(WARNING);
|
||||
|
||||
DiagnosticFactory1<PsiElement, String> JVM_DEFAULT_IN_JVM6_TARGET = DiagnosticFactory1.create(ERROR);
|
||||
DiagnosticFactory1<KtElement, String> JVM_DEFAULT_IN_DECLARATION = DiagnosticFactory1.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT);
|
||||
DiagnosticFactory0<KtElement> JVM_DEFAULT_WITH_COMPATIBILITY_IN_DECLARATION = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtElement> JVM_DEFAULT_WITH_COMPATIBILITY_NOT_ON_INTERFACE = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
Reference in New Issue
Block a user