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:
@@ -0,0 +1,30 @@
|
||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
package test
|
||||
|
||||
import kotlin.internal.RequireKotlin
|
||||
|
||||
class Outer {
|
||||
inner class Inner {
|
||||
@RequireKotlin("1.1")
|
||||
inner class Deep @RequireKotlin("1.1") constructor() {
|
||||
@RequireKotlin("1.1")
|
||||
fun f() {}
|
||||
|
||||
@RequireKotlin("1.1")
|
||||
val x = ""
|
||||
|
||||
suspend fun s() {}
|
||||
}
|
||||
}
|
||||
|
||||
class Nested {
|
||||
@RequireKotlin("1.1")
|
||||
fun g() {}
|
||||
}
|
||||
|
||||
@RequireKotlin("1.1")
|
||||
companion object
|
||||
}
|
||||
|
||||
@RequireKotlin("1.1")
|
||||
fun topLevel() {}
|
||||
Reference in New Issue
Block a user