Fix version requirement serialization for nested classes
Use the version requierement table of the outer DescriptorSerializer instance when serializing metadata for a class. Pass parent serializer to DescriptorSerializer.create to make sure the correct table is used. Serialize nested classes before the outer class in JS and common code, to make sure requirements are not lost. Also, split VersionRequirementTest to JVM and JS #KT-25120 In Progress
This commit is contained in:
+1
-3
@@ -3,9 +3,7 @@ suspend fun callRelease() {
|
||||
|
||||
C().dummy()
|
||||
|
||||
// TODO: This should be error
|
||||
WithNested.Nested().dummy()
|
||||
|
||||
// TODO: This should be error
|
||||
WithInner().Inner().dummy()
|
||||
}
|
||||
}
|
||||
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/releaseCoroutineCallFromExperimental/output.txt
Vendored
+6
@@ -4,4 +4,10 @@ compiler/testData/compileKotlinAgainstCustomBinaries/releaseCoroutineCallFromExp
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/releaseCoroutineCallFromExperimental/experimental.kt:4:9: error: 'dummy(): String' is only available since Kotlin 1.3 and cannot be used in Kotlin 1.2
|
||||
C().dummy()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/releaseCoroutineCallFromExperimental/experimental.kt:6:25: error: 'dummy(): String' is only available since Kotlin 1.3 and cannot be used in Kotlin 1.2
|
||||
WithNested.Nested().dummy()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/releaseCoroutineCallFromExperimental/experimental.kt:8:25: error: 'dummy(): String' is only available since Kotlin 1.3 and cannot be used in Kotlin 1.2
|
||||
WithInner().Inner().dummy()
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
Reference in New Issue
Block a user