6ae81c3ade
KotlinInfo annotation now has a version() field, which should be equal to the compiler's JvmAbi.VERSION in order for this class to properly load and be used. Create ErrorReporter class, which has a trace to which it can report errors (now only related to ABI version). This is done because a dependency of DeserializedDescriptorResolver from BindingTrace would be confusing. Implementation of ErrorReporter will probably need to change when we untie deserialization from java-resolve. Check if PsiClass is actually a compiled class before trying to load serialized data from it: otherwise it can be a Java source, as was in wrongAbiVersion() test, and ASM will fail when trying to read that file. Rewrite the test so that it now has a compiled Kotlin classes to check against (also include sources to recompile this binary data later, although it won't probably be needed)
6 lines
596 B
Plaintext
6 lines
596 B
Plaintext
WARNING: $TESTDATA_DIR$/wrongAbiVersion.kt: (3, 9) Parameter 'x' is never used
|
|
ERROR: $TESTDATA_DIR$/wrongAbiVersion.kt: (4, 3) Unresolved reference: bar
|
|
ERROR: $TESTDATA_DIR$/wrongAbiVersionLib/wrong/WrongPackage.class: (-1, 135) Class 'wrong.WrongPackage' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is 7
|
|
ERROR: $TESTDATA_DIR$/wrongAbiVersionLib/ClassWithWrongAbiVersion.class: (-1, 119) Class 'ClassWithWrongAbiVersion' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is 7
|
|
COMPILATION_ERROR
|