rename error
This commit is contained in:
@@ -84,7 +84,7 @@ public interface Errors {
|
||||
DiagnosticFactory1<JetSimpleNameExpression, DeclarationDescriptor> CANNOT_BE_IMPORTED = DiagnosticFactory1.create(ERROR);
|
||||
SimpleDiagnosticFactory<JetExpression> USELESS_HIDDEN_IMPORT = SimpleDiagnosticFactory.create(WARNING);
|
||||
SimpleDiagnosticFactory<JetExpression> USELESS_SIMPLE_IMPORT = SimpleDiagnosticFactory.create(WARNING);
|
||||
DiagnosticFactory1<JetElement, Collection<ClassDescriptor>> CLASS_HAS_KOTLIN_ANALOG = DiagnosticFactory1.create(WARNING);
|
||||
DiagnosticFactory1<JetElement, Collection<ClassDescriptor>> PLATFORM_CLASS_MAPPED_TO_KOTLIN = DiagnosticFactory1.create(WARNING);
|
||||
|
||||
SimpleDiagnosticFactory<JetParameter> CANNOT_INFER_PARAMETER_TYPE = SimpleDiagnosticFactory.create(ERROR);
|
||||
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ public class DefaultErrorMessages {
|
||||
MAP.put(CANNOT_BE_IMPORTED, "Cannot import ''{0}'', functions and properties can be imported only from packages", NAME);
|
||||
MAP.put(USELESS_HIDDEN_IMPORT, "Useless import, it is hidden further");
|
||||
MAP.put(USELESS_SIMPLE_IMPORT, "Useless import, does nothing");
|
||||
MAP.put(CLASS_HAS_KOTLIN_ANALOG, "This class has Kotlin analog(s) {0} that should be used instead.", CLASS_DESCRIPTOR_LIST);
|
||||
MAP.put(PLATFORM_CLASS_MAPPED_TO_KOTLIN, "This class shouldn't be used in Kotlin. Use {0} instead.", CLASS_DESCRIPTOR_LIST);
|
||||
|
||||
MAP.put(CANNOT_INFER_PARAMETER_TYPE,
|
||||
"Cannot infer a type for this parameter. To specify it explicitly use the {(p : Type) => ...} notation");
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.jetbrains.jet.lang.diagnostics.Errors.CLASS_HAS_KOTLIN_ANALOG;
|
||||
import static org.jetbrains.jet.lang.diagnostics.Errors.PLATFORM_CLASS_MAPPED_TO_KOTLIN;
|
||||
import static org.jetbrains.jet.lang.diagnostics.Errors.USELESS_HIDDEN_IMPORT;
|
||||
import static org.jetbrains.jet.lang.diagnostics.Errors.USELESS_SIMPLE_IMPORT;
|
||||
|
||||
@@ -149,7 +149,7 @@ public class ImportsResolver {
|
||||
PlatformToKotlinClassMap platformToKotlinMap = configuration.getPlatformToKotlinClassMap();
|
||||
Collection<ClassDescriptor> kotlinAnalogsForClass = platformToKotlinMap.mapPlatformClass((ClassDescriptor) descriptor);
|
||||
if (!kotlinAnalogsForClass.isEmpty()) {
|
||||
trace.report(CLASS_HAS_KOTLIN_ANALOG.on(element, kotlinAnalogsForClass));
|
||||
trace.report(PLATFORM_CLASS_MAPPED_TO_KOTLIN.on(element, kotlinAnalogsForClass));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user