[FIR] Change API for generating nested classes from plugins
`FirDeclarationGenerationExtension.generateClassLikeDeclaration` was split into two functions: one for generating top level classes, and one for nested classes. Such change reduces verbosity and error-proness of this extension and also allows to smoothly run plugins on local classes ^KT-55248 Fixed
This commit is contained in:
committed by
Space Team
parent
faa96ec7c0
commit
6783621eb0
@@ -0,0 +1,20 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_STDLIB
|
||||
|
||||
import kotlinx.serialization.*
|
||||
|
||||
fun local(): String {
|
||||
@Serializable
|
||||
data class Carrier(val i: Int)
|
||||
|
||||
return Carrier.serializer().descriptor.toString()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val expected = "local.Carrier(i: kotlin.Int)"
|
||||
val actual = local()
|
||||
if (expected != actual) {
|
||||
return "Fail: $actual"
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user