Wrong abi test fix
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
compiler/testData/cli/jvm/wrongAbiVersionLib/bin/ClassWithWrongAbiVersion.class: error: class 'ClassWithWrongAbiVersion' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is $ABI_VERSION$
|
compiler/testData/cli/jvm/wrongAbiVersionLib/bin/ClassWithWrongAbiVersion.class: error: class 'ClassWithWrongAbiVersion' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is $ABI_VERSION$
|
||||||
compiler/testData/cli/jvm/wrongAbiVersionLib/bin/wrong/WrongPackage.class: error: class 'wrong/WrongPackage' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is $ABI_VERSION$
|
compiler/testData/cli/jvm/wrongAbiVersionLib/bin/wrong/Wrong_packageKt.class: error: class 'wrong/Wrong_packageKt' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is $ABI_VERSION$
|
||||||
compiler/testData/cli/jvm/wrongAbiVersion.kt:4:3: error: unresolved reference: bar
|
compiler/testData/cli/jvm/wrongAbiVersion.kt:4:3: error: unresolved reference: bar
|
||||||
bar()
|
bar()
|
||||||
^
|
^
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
wrong->wrong/Wrong_packageKt
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
+7
-3
@@ -70,7 +70,7 @@ public final class DeserializedDescriptorResolver {
|
|||||||
@Nullable
|
@Nullable
|
||||||
public JetScope createKotlinPackageScope(@NotNull PackageFragmentDescriptor descriptor, @NotNull KotlinJvmBinaryClass kotlinClass) {
|
public JetScope createKotlinPackageScope(@NotNull PackageFragmentDescriptor descriptor, @NotNull KotlinJvmBinaryClass kotlinClass) {
|
||||||
//TODO add assertion from readData(kotlinClass, CLASS);
|
//TODO add assertion from readData(kotlinClass, CLASS);
|
||||||
String[] data = kotlinClass.getClassHeader().getAnnotationData();
|
String[] data = readData(kotlinClass, KotlinClassHeader.Kind.FILE_FACADE);
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
//all classes are included in java scope
|
//all classes are included in java scope
|
||||||
PackageData packageData = JvmProtoBufUtil.readPackageDataFrom(data);
|
PackageData packageData = JvmProtoBufUtil.readPackageDataFrom(data);
|
||||||
@@ -92,8 +92,12 @@ public final class DeserializedDescriptorResolver {
|
|||||||
List<JetScope> list = new ArrayList<JetScope>();
|
List<JetScope> list = new ArrayList<JetScope>();
|
||||||
for (KotlinJvmBinaryClass callable : packageParts) {
|
for (KotlinJvmBinaryClass callable : packageParts) {
|
||||||
JetScope scope = createKotlinPackageScope(descriptor, callable);
|
JetScope scope = createKotlinPackageScope(descriptor, callable);
|
||||||
assert scope != null : "Can't create scope for " + callable;
|
if (scope != null) {
|
||||||
list.add(scope);
|
list.add(scope);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (list.isEmpty()) {
|
||||||
|
return JetScope.Empty.INSTANCE$;
|
||||||
}
|
}
|
||||||
return new DeserializedNewPackageMemberScope(descriptor, list);
|
return new DeserializedNewPackageMemberScope(descriptor, list);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user