Use ClassId instead of JvmClassName in KotlinJvmBinaryClass

ClassId contains exact information about origin of the class (e.g. if '$' in
the class name denotes nested classes separator or just a character in the
name)
This commit is contained in:
Alexander Udalov
2014-09-15 13:49:55 +04:00
parent 1f8b2cef52
commit 7595e32bb6
21 changed files with 108 additions and 110 deletions
@@ -34,6 +34,7 @@ import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.lang.resolve.*;
import org.jetbrains.jet.lang.resolve.java.JavaBindingContext;
import org.jetbrains.jet.lang.resolve.java.JvmAbi;
import org.jetbrains.jet.lang.resolve.java.JvmClassName;
import org.jetbrains.jet.lang.resolve.java.resolver.TraceBasedErrorReporter;
import org.jetbrains.jet.lang.resolve.kotlin.VirtualFileKotlinClass;
@@ -144,7 +145,7 @@ public final class AnalyzerWithCompilerReport {
Integer abiVersion = bindingContext.get(TraceBasedErrorReporter.ABI_VERSION_ERRORS, kotlinClass);
String path = toSystemDependentName(kotlinClass.getFile().getPath());
messageCollectorWrapper.report(CompilerMessageSeverity.ERROR,
"Class '" + kotlinClass.getClassName() +
"Class '" + JvmClassName.byClassId(kotlinClass.getClassId()) +
"' was compiled with an incompatible version of Kotlin. " +
"Its ABI version is " + abiVersion + ", expected ABI version is " + JvmAbi.VERSION,
CompilerMessageLocation.create(path, 0, 0));