PLATFORM_DECLARATION_WITHOUT_DEFINITION rendering changed (platform is included into diagnostic text now)
This commit is contained in:
@@ -510,9 +510,9 @@ public interface Errors {
|
||||
DiagnosticFactory0<KtTypeAlias> IMPL_TYPE_ALIAS_WITH_USE_SITE_VARIANCE = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
|
||||
DiagnosticFactory0<KtTypeAlias> IMPL_TYPE_ALIAS_WITH_COMPLEX_SUBSTITUTION = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE);
|
||||
|
||||
DiagnosticFactory2<KtDeclaration, MemberDescriptor,
|
||||
DiagnosticFactory3<KtDeclaration, MemberDescriptor, ModuleDescriptor,
|
||||
Map<HeaderImplDeclarationChecker.Compatibility.Incompatible, Collection<MemberDescriptor>>> HEADER_WITHOUT_IMPLEMENTATION =
|
||||
DiagnosticFactory2.create(ERROR, DECLARATION_SIGNATURE);
|
||||
DiagnosticFactory3.create(ERROR, DECLARATION_SIGNATURE);
|
||||
DiagnosticFactory0<PsiElement> IMPLEMENTATION_WITHOUT_HEADER = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
+2
-1
@@ -270,7 +270,8 @@ public class DefaultErrorMessages {
|
||||
MAP.put(IMPL_TYPE_ALIAS_WITH_USE_SITE_VARIANCE, "Right-hand side of 'impl' type alias cannot contain use-site variance or star projections");
|
||||
MAP.put(IMPL_TYPE_ALIAS_WITH_COMPLEX_SUBSTITUTION, "Type arguments in the right-hand side of 'impl' type alias should be its type parameters in the same order, e.g. 'impl typealias Foo<A, B> = Bar<A, B>'");
|
||||
|
||||
MAP.put(HEADER_WITHOUT_IMPLEMENTATION, "No implementation is found for header declaration ''{0}''{1}", NAME, PlatformIncompatibilityDiagnosticRenderer.INSTANCE);
|
||||
MAP.put(HEADER_WITHOUT_IMPLEMENTATION, "Header declaration ''{0}'' has no implementation in module {1}{2}", NAME,
|
||||
PLATFORM, PlatformIncompatibilityDiagnosticRenderer.INSTANCE);
|
||||
MAP.put(IMPLEMENTATION_WITHOUT_HEADER, "Modifier 'impl' is only applicable to members that are initially declared in platform-independent code");
|
||||
|
||||
MAP.put(PROJECTION_ON_NON_CLASS_TYPE_ARGUMENT, "Projections are not allowed on type arguments of functions and properties");
|
||||
|
||||
@@ -75,6 +75,10 @@ object Renderers {
|
||||
|
||||
@JvmField val NAME = Renderer<Named> { it.name.asString() }
|
||||
|
||||
@JvmField val PLATFORM = Renderer<ModuleDescriptor> {
|
||||
if (it.platformKind == PlatformKind.DEFAULT) "" else "for " + it.platformKind.name
|
||||
}
|
||||
|
||||
@JvmField val VISIBILITY = Renderer<Visibility> {
|
||||
if (it == Visibilities.INVISIBLE_FAKE)
|
||||
"invisible (private in a supertype)"
|
||||
|
||||
+2
-1
@@ -92,7 +92,8 @@ class HeaderImplDeclarationChecker(val moduleToCheck: ModuleDescriptor? = null)
|
||||
assert(compatibility.keys.all { it is Incompatible })
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val incompatibility = compatibility as Map<Incompatible, Collection<MemberDescriptor>>
|
||||
diagnosticHolder.report(Errors.HEADER_WITHOUT_IMPLEMENTATION.on(reportOn, descriptor, incompatibility))
|
||||
diagnosticHolder.report(Errors.HEADER_WITHOUT_IMPLEMENTATION.on(
|
||||
reportOn, descriptor, moduleToCheck ?: descriptor.module, incompatibility))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] No implementation is found for header declaration 'My'">My</error> {
|
||||
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'My' has no implementation in module for JVM">My</error> {
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
}
|
||||
|
||||
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] No implementation is found for header declaration 'His'">His</error> {
|
||||
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'His' has no implementation in module for JVM">His</error> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] No implementation is found for header declaration 'My'"><error descr="[HEADER_WITHOUT_IMPLEMENTATION] No implementation is found for header declaration 'My'">My</error></error> {
|
||||
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'My' has no implementation in module for JS"><error descr="[HEADER_WITHOUT_IMPLEMENTATION] Header declaration 'My' has no implementation in module for JVM">My</error></error> {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user