Report ABI errors on KotlinClass, not VirtualFile

This commit is contained in:
Alexander Udalov
2013-10-01 22:58:40 +04:00
parent 1afd0504fa
commit f68a702e8f
6 changed files with 17 additions and 43 deletions
@@ -16,13 +16,12 @@
package org.jetbrains.jet.lang.resolve.java.resolver;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.lang.descriptors.CallableMemberDescriptor;
import org.jetbrains.jet.lang.resolve.name.FqName;
import org.jetbrains.jet.lang.resolve.kotlin.KotlinJvmBinaryClass;
public interface ErrorReporter {
void reportIncompatibleAbiVersion(@NotNull FqName fqName, @NotNull VirtualFile file, int actualVersion);
void reportIncompatibleAbiVersion(@NotNull KotlinJvmBinaryClass kotlinClass, int actualVersion);
void reportCannotInferVisibility(@NotNull CallableMemberDescriptor descriptor);
}
@@ -116,7 +116,7 @@ public final class DeserializedDescriptorResolver {
}
if (header != null) {
errorReporter.reportIncompatibleAbiVersion(kotlinClass.getClassName().getFqName(), kotlinClass.getFile(), header.getVersion());
errorReporter.reportIncompatibleAbiVersion(kotlinClass, header.getVersion());
}
return null;
@@ -16,16 +16,12 @@
package org.jetbrains.jet.lang.resolve.kotlin;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.lang.resolve.java.JvmClassName;
import org.jetbrains.jet.lang.resolve.name.Name;
public interface KotlinJvmBinaryClass {
@NotNull
VirtualFile getFile();
@NotNull
JvmClassName getClassName();