Add some tests for kotlinx.serialization plugin:
- declaration checker - bytecode listings - JVM IR Improve @Transient redundant reporting
This commit is contained in:
@@ -621,6 +621,7 @@ tasks {
|
||||
":kotlin-sam-with-receiver-compiler-plugin:test",
|
||||
":plugins:uast-kotlin:test",
|
||||
":kotlin-annotation-processing-gradle:test",
|
||||
":kotlinx-serialization-compiler-plugin:test",
|
||||
":kotlinx-serialization-ide-plugin:test"
|
||||
)
|
||||
}
|
||||
|
||||
+3
-1
@@ -24,7 +24,7 @@ abstract class AbstractAsmLikeInstructionListingTest : CodegenTestCase() {
|
||||
}
|
||||
|
||||
override fun doMultiFileTest(wholeFile: File, files: List<TestFile>) {
|
||||
val txtFile = File(wholeFile.parentFile, wholeFile.nameWithoutExtension + ".txt")
|
||||
val txtFile = File(wholeFile.parentFile, getExpectedTextFileName(wholeFile))
|
||||
compile(files)
|
||||
|
||||
val classes = classFileFactory
|
||||
@@ -46,6 +46,8 @@ abstract class AbstractAsmLikeInstructionListingTest : CodegenTestCase() {
|
||||
})
|
||||
}
|
||||
|
||||
protected open fun getExpectedTextFileName(wholeFile: File): String = wholeFile.nameWithoutExtension + ".txt"
|
||||
|
||||
private fun renderClassNode(clazz: ClassNode, showBytecodeForTheseMethods: List<String>, showLocalVariables: Boolean): String {
|
||||
val fields = (clazz.fields ?: emptyList()).sortedBy { it.name }
|
||||
val methods = (clazz.methods ?: emptyList()).sortedBy { it.name }
|
||||
|
||||
@@ -28,6 +28,7 @@ dependencies {
|
||||
compile(projectTests(":kotlin-allopen-compiler-plugin"))
|
||||
compile(projectTests(":kotlin-noarg-compiler-plugin"))
|
||||
compile(projectTests(":kotlin-sam-with-receiver-compiler-plugin"))
|
||||
compile(projectTests(":kotlinx-serialization-compiler-plugin"))
|
||||
compile(projectTests(":generators:test-generator"))
|
||||
builtinsCompile("org.jetbrains.kotlin:kotlin-stdlib:$bootstrapKotlinVersion")
|
||||
testCompileOnly(project(":kotlin-reflect-api"))
|
||||
|
||||
@@ -38,7 +38,6 @@ import org.jetbrains.kotlin.generators.util.KT_OR_KTS
|
||||
import org.jetbrains.kotlin.generators.util.KT_OR_KTS_WITHOUT_DOTS_IN_NAME
|
||||
import org.jetbrains.kotlin.generators.util.KT_WITHOUT_DOTS_IN_NAME
|
||||
import org.jetbrains.kotlin.idea.AbstractExpressionSelectionTest
|
||||
import org.jetbrains.kotlin.idea.index.AbstractKotlinTypeAliasByExpansionShortNameIndexTest
|
||||
import org.jetbrains.kotlin.idea.AbstractSmartSelectionTest
|
||||
import org.jetbrains.kotlin.idea.actions.AbstractGotoTestOrCodeActionTest
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.*
|
||||
@@ -65,7 +64,10 @@ import org.jetbrains.kotlin.idea.conversion.copy.AbstractLiteralKotlinToKotlinCo
|
||||
import org.jetbrains.kotlin.idea.conversion.copy.AbstractLiteralTextToKotlinCopyPasteTest
|
||||
import org.jetbrains.kotlin.idea.conversion.copy.AbstractTextJavaToKotlinCopyPasteConversionTest
|
||||
import org.jetbrains.kotlin.idea.coverage.AbstractKotlinCoverageOutputFilesTest
|
||||
import org.jetbrains.kotlin.idea.debugger.*
|
||||
import org.jetbrains.kotlin.idea.debugger.AbstractFileRankingTest
|
||||
import org.jetbrains.kotlin.idea.debugger.AbstractKotlinSteppingTest
|
||||
import org.jetbrains.kotlin.idea.debugger.AbstractPositionManagerTest
|
||||
import org.jetbrains.kotlin.idea.debugger.AbstractSmartStepIntoTest
|
||||
import org.jetbrains.kotlin.idea.debugger.evaluate.*
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.AbstractSequenceTraceTestCase
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest
|
||||
@@ -88,6 +90,7 @@ import org.jetbrains.kotlin.idea.hierarchy.AbstractHierarchyWithLibTest
|
||||
import org.jetbrains.kotlin.idea.highlighter.*
|
||||
import org.jetbrains.kotlin.idea.imports.AbstractJsOptimizeImportsTest
|
||||
import org.jetbrains.kotlin.idea.imports.AbstractJvmOptimizeImportsTest
|
||||
import org.jetbrains.kotlin.idea.index.AbstractKotlinTypeAliasByExpansionShortNameIndexTest
|
||||
import org.jetbrains.kotlin.idea.inspections.AbstractLocalInspectionTest
|
||||
import org.jetbrains.kotlin.idea.inspections.AbstractMultiFileLocalInspectionTest
|
||||
import org.jetbrains.kotlin.idea.intentions.AbstractConcatenatedStringGeneratorTest
|
||||
@@ -140,11 +143,11 @@ import org.jetbrains.kotlin.jps.build.*
|
||||
import org.jetbrains.kotlin.jps.build.dependeciestxt.actualizeMppJpsIncTestCaseDirs
|
||||
import org.jetbrains.kotlin.jps.incremental.AbstractJsProtoComparisonTest
|
||||
import org.jetbrains.kotlin.jps.incremental.AbstractJvmProtoComparisonTest
|
||||
import org.jetbrains.kotlin.kapt.cli.test.AbstractArgumentParsingTest
|
||||
import org.jetbrains.kotlin.kapt.cli.test.AbstractKaptToolIntegrationTest
|
||||
import org.jetbrains.kotlin.jvm.abi.AbstractCompareJvmAbiTest
|
||||
import org.jetbrains.kotlin.jvm.abi.AbstractCompileAgainstJvmAbiTest
|
||||
import org.jetbrains.kotlin.jvm.abi.AbstractJvmAbiContentTest
|
||||
import org.jetbrains.kotlin.kapt.cli.test.AbstractArgumentParsingTest
|
||||
import org.jetbrains.kotlin.kapt.cli.test.AbstractKaptToolIntegrationTest
|
||||
import org.jetbrains.kotlin.kapt3.test.AbstractClassFileToSourceStubConverterTest
|
||||
import org.jetbrains.kotlin.kapt3.test.AbstractKotlinKaptContextTest
|
||||
import org.jetbrains.kotlin.nj2k.AbstractNewJavaToKotlinConverterSingleFileTest
|
||||
@@ -158,6 +161,9 @@ import org.jetbrains.kotlin.search.AbstractAnnotatedMembersSearchTest
|
||||
import org.jetbrains.kotlin.search.AbstractInheritorsSearchTest
|
||||
import org.jetbrains.kotlin.shortenRefs.AbstractShortenRefsTest
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginBytecodeListingTest
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginDiagnosticTest
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationIrBytecodeListingTest
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
System.setProperty("java.awt.headless", "true")
|
||||
@@ -1143,6 +1149,23 @@ fun main(args: Array<String>) {
|
||||
model("script", extension = "kts")
|
||||
}
|
||||
}
|
||||
|
||||
testGroup(
|
||||
"plugins/kotlin-serialization/kotlin-serialization-compiler/test",
|
||||
"plugins/kotlin-serialization/kotlin-serialization-compiler/testData"
|
||||
) {
|
||||
testClass<AbstractSerializationPluginDiagnosticTest> {
|
||||
model("diagnostics")
|
||||
}
|
||||
|
||||
testClass<AbstractSerializationPluginBytecodeListingTest> {
|
||||
model("codegen")
|
||||
}
|
||||
|
||||
testClass<AbstractSerializationIrBytecodeListingTest> {
|
||||
model("codegen")
|
||||
}
|
||||
}
|
||||
/*
|
||||
testGroup("plugins/android-extensions/android-extensions-idea/tests", "plugins/android-extensions/android-extensions-idea/testData") {
|
||||
testClass<AbstractAndroidCompletionTest> {
|
||||
|
||||
@@ -167,6 +167,9 @@ import org.jetbrains.kotlin.search.AbstractAnnotatedMembersSearchTest
|
||||
import org.jetbrains.kotlin.search.AbstractInheritorsSearchTest
|
||||
import org.jetbrains.kotlin.shortenRefs.AbstractShortenRefsTest
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginBytecodeListingTest
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginDiagnosticTest
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationIrBytecodeListingTest
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
System.setProperty("java.awt.headless", "true")
|
||||
@@ -1154,6 +1157,23 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
|
||||
testGroup(
|
||||
"plugins/kotlin-serialization/kotlin-serialization-compiler/test",
|
||||
"plugins/kotlin-serialization/kotlin-serialization-compiler/testData"
|
||||
) {
|
||||
testClass<AbstractSerializationPluginDiagnosticTest> {
|
||||
model("diagnostics")
|
||||
}
|
||||
|
||||
testClass<AbstractSerializationPluginBytecodeListingTest> {
|
||||
model("codegen")
|
||||
}
|
||||
|
||||
testClass<AbstractSerializationIrBytecodeListingTest> {
|
||||
model("codegen")
|
||||
}
|
||||
}
|
||||
/*
|
||||
testGroup("plugins/android-extensions/android-extensions-idea/tests", "plugins/android-extensions/android-extensions-idea/testData") {
|
||||
testClass<AbstractAndroidCompletionTest> {
|
||||
model("android/completion", recursive = false, extension = null)
|
||||
|
||||
@@ -149,6 +149,9 @@ import org.jetbrains.kotlin.search.AbstractAnnotatedMembersSearchTest
|
||||
import org.jetbrains.kotlin.search.AbstractInheritorsSearchTest
|
||||
import org.jetbrains.kotlin.shortenRefs.AbstractShortenRefsTest
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginBytecodeListingTest
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginDiagnosticTest
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationIrBytecodeListingTest
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
System.setProperty("java.awt.headless", "true")
|
||||
@@ -1028,6 +1031,23 @@ fun main(args: Array<String>) {
|
||||
model("script", extension = "kts")
|
||||
}
|
||||
}
|
||||
|
||||
testGroup(
|
||||
"plugins/kotlin-serialization/kotlin-serialization-compiler/test",
|
||||
"plugins/kotlin-serialization/kotlin-serialization-compiler/testData"
|
||||
) {
|
||||
testClass<AbstractSerializationPluginDiagnosticTest> {
|
||||
model("diagnostics")
|
||||
}
|
||||
|
||||
testClass<AbstractSerializationPluginBytecodeListingTest> {
|
||||
model("codegen")
|
||||
}
|
||||
|
||||
testClass<AbstractSerializationIrBytecodeListingTest> {
|
||||
model("codegen")
|
||||
}
|
||||
}
|
||||
/*
|
||||
testGroup("plugins/android-extensions/android-extensions-idea/tests", "plugins/android-extensions/android-extensions-idea/testData") {
|
||||
testClass<AbstractAndroidCompletionTest> {
|
||||
|
||||
@@ -149,6 +149,9 @@ import org.jetbrains.kotlin.search.AbstractAnnotatedMembersSearchTest
|
||||
import org.jetbrains.kotlin.search.AbstractInheritorsSearchTest
|
||||
import org.jetbrains.kotlin.shortenRefs.AbstractShortenRefsTest
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginBytecodeListingTest
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginDiagnosticTest
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationIrBytecodeListingTest
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
System.setProperty("java.awt.headless", "true")
|
||||
@@ -1032,6 +1035,23 @@ fun main(args: Array<String>) {
|
||||
model("script", extension = "kts")
|
||||
}
|
||||
}
|
||||
|
||||
testGroup(
|
||||
"plugins/kotlin-serialization/kotlin-serialization-compiler/test",
|
||||
"plugins/kotlin-serialization/kotlin-serialization-compiler/testData"
|
||||
) {
|
||||
testClass<AbstractSerializationPluginDiagnosticTest> {
|
||||
model("diagnostics")
|
||||
}
|
||||
|
||||
testClass<AbstractSerializationPluginBytecodeListingTest> {
|
||||
model("codegen")
|
||||
}
|
||||
|
||||
testClass<AbstractSerializationIrBytecodeListingTest> {
|
||||
model("codegen")
|
||||
}
|
||||
}
|
||||
/*
|
||||
testGroup("plugins/android-extensions/android-extensions-idea/tests", "plugins/android-extensions/android-extensions-idea/testData") {
|
||||
testClass<AbstractAndroidCompletionTest> {
|
||||
|
||||
@@ -151,6 +151,9 @@ import org.jetbrains.kotlin.search.AbstractAnnotatedMembersSearchTest
|
||||
import org.jetbrains.kotlin.search.AbstractInheritorsSearchTest
|
||||
import org.jetbrains.kotlin.shortenRefs.AbstractShortenRefsTest
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginBytecodeListingTest
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginDiagnosticTest
|
||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationIrBytecodeListingTest
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
System.setProperty("java.awt.headless", "true")
|
||||
@@ -1040,6 +1043,23 @@ fun main(args: Array<String>) {
|
||||
model("script", extension = "kts")
|
||||
}
|
||||
}
|
||||
|
||||
testGroup(
|
||||
"plugins/kotlin-serialization/kotlin-serialization-compiler/test",
|
||||
"plugins/kotlin-serialization/kotlin-serialization-compiler/testData"
|
||||
) {
|
||||
testClass<AbstractSerializationPluginDiagnosticTest> {
|
||||
model("diagnostics")
|
||||
}
|
||||
|
||||
testClass<AbstractSerializationPluginBytecodeListingTest> {
|
||||
model("codegen")
|
||||
}
|
||||
|
||||
testClass<AbstractSerializationIrBytecodeListingTest> {
|
||||
model("codegen")
|
||||
}
|
||||
}
|
||||
/*
|
||||
testGroup("plugins/android-extensions/android-extensions-idea/tests", "plugins/android-extensions/android-extensions-idea/testData") {
|
||||
testClass<AbstractAndroidCompletionTest> {
|
||||
|
||||
@@ -16,13 +16,24 @@ dependencies {
|
||||
compile(project(":js:js.translator"))
|
||||
|
||||
runtime(kotlinStdlib())
|
||||
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile("org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.11.0")
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
runtimeJar()
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
testsJar {}
|
||||
|
||||
dist(targetName = the<BasePluginConvention>().archivesBaseName + ".jar")
|
||||
|
||||
projectTest(parallel = true) {
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
+10
-4
@@ -20,12 +20,14 @@ import org.jetbrains.kotlin.resolve.checkers.DeclarationCheckerContext
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.getSuperClassOrAny
|
||||
import org.jetbrains.kotlin.resolve.hasBackingField
|
||||
import org.jetbrains.kotlin.resolve.isInlineClassType
|
||||
import org.jetbrains.kotlin.resolve.lazy.descriptors.LazyAnnotationDescriptor
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
import org.jetbrains.kotlin.types.typeUtil.supertypes
|
||||
import org.jetbrains.kotlin.util.slicedMap.Slices
|
||||
import org.jetbrains.kotlin.util.slicedMap.WritableSlice
|
||||
import org.jetbrains.kotlinx.serialization.compiler.backend.common.*
|
||||
import org.jetbrains.kotlinx.serialization.compiler.backend.common.AbstractSerialGenerator
|
||||
import org.jetbrains.kotlinx.serialization.compiler.backend.common.bodyPropertiesDescriptorsMap
|
||||
import org.jetbrains.kotlinx.serialization.compiler.backend.common.findTypeSerializerOrContextUnchecked
|
||||
import org.jetbrains.kotlinx.serialization.compiler.backend.common.primaryConstructorPropertiesDescriptorsMap
|
||||
import org.jetbrains.kotlinx.serialization.compiler.resolve.*
|
||||
|
||||
@@ -103,17 +105,21 @@ class SerializationPluginDeclarationChecker : DeclarationChecker {
|
||||
val isInitialized = declarationHasInitializer(declaration)
|
||||
val isMarkedTransient = descriptor.annotations.serialTransient
|
||||
val hasBackingField = descriptor.hasBackingField(trace.bindingContext)
|
||||
if (!hasBackingField && isMarkedTransient)
|
||||
if (!hasBackingField && isMarkedTransient) {
|
||||
val transientPsi =
|
||||
(descriptor.annotations.findAnnotation(SerializationAnnotations.serialTransientFqName) as? LazyAnnotationDescriptor)?.annotationEntry
|
||||
trace.reportFromPlugin(
|
||||
SerializationErrors.TRANSIENT_IS_REDUNDANT.on(declaration),
|
||||
SerializationErrors.TRANSIENT_IS_REDUNDANT.on(transientPsi ?: declaration),
|
||||
SerializationPluginErrorsRendering
|
||||
)
|
||||
}
|
||||
|
||||
if (isMarkedTransient && !isInitialized && hasBackingField)
|
||||
if (isMarkedTransient && !isInitialized && hasBackingField) {
|
||||
trace.reportFromPlugin(
|
||||
SerializationErrors.TRANSIENT_MISSING_INITIALIZER.on(declaration),
|
||||
SerializationPluginErrorsRendering
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ object SerializationPluginErrorsRendering : DefaultErrorMessages.Extension {
|
||||
)
|
||||
MAP.put(
|
||||
SerializationErrors.SERIALIZABLE_ANNOTATION_IGNORED,
|
||||
"@Serializable annotation is ignored because it is impossible to serialize automatically interfaces or enums" +
|
||||
"@Serializable annotation is ignored because it is impossible to serialize automatically interfaces or enums. " +
|
||||
"Provide serializer manually via e.g. companion object"
|
||||
)
|
||||
MAP.put(
|
||||
@@ -54,7 +54,7 @@ object SerializationPluginErrorsRendering : DefaultErrorMessages.Extension {
|
||||
)
|
||||
MAP.put(
|
||||
SerializationErrors.TRANSIENT_IS_REDUNDANT,
|
||||
"This property does not have backing field which makes it non-serializable and therefore @Transient is redundant"
|
||||
"Property does not have backing field which makes it non-serializable and therefore @Transient is redundant"
|
||||
)
|
||||
}
|
||||
}
|
||||
+12
-5
@@ -17,6 +17,7 @@
|
||||
package org.jetbrains.kotlinx.serialization.compiler.extensions
|
||||
|
||||
import com.intellij.mock.MockProject
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension
|
||||
import org.jetbrains.kotlin.codegen.extensions.ExpressionCodegenExtension
|
||||
import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
|
||||
@@ -32,13 +33,19 @@ import org.jetbrains.kotlinx.serialization.compiler.diagnostic.SerializationPlug
|
||||
|
||||
class SerializationComponentRegistrar : ComponentRegistrar {
|
||||
override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) {
|
||||
SyntheticResolveExtension.registerExtension(project, SerializationResolveExtension())
|
||||
registerExtensions(project)
|
||||
}
|
||||
|
||||
ExpressionCodegenExtension.registerExtension(project, SerializationCodegenExtension())
|
||||
JsSyntheticTranslateExtension.registerExtension(project, SerializationJsExtension())
|
||||
IrGenerationExtension.registerExtension(project, SerializationLoweringExtension())
|
||||
companion object {
|
||||
fun registerExtensions(project: Project) {
|
||||
SyntheticResolveExtension.registerExtension(project, SerializationResolveExtension())
|
||||
|
||||
StorageComponentContainerContributor.registerExtension(project, SerializationPluginComponentContainerContributor())
|
||||
ExpressionCodegenExtension.registerExtension(project, SerializationCodegenExtension())
|
||||
JsSyntheticTranslateExtension.registerExtension(project, SerializationJsExtension())
|
||||
IrGenerationExtension.registerExtension(project, SerializationLoweringExtension())
|
||||
|
||||
StorageComponentContainerContributor.registerExtension(project, SerializationPluginComponentContainerContributor())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlinx.serialization
|
||||
|
||||
import junit.framework.TestCase
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
import org.jetbrains.kotlin.cli.jvm.config.JvmClasspathRoot
|
||||
import org.jetbrains.kotlin.codegen.AbstractAsmLikeInstructionListingTest
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.config.JVMConfigurationKeys
|
||||
import org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationComponentRegistrar
|
||||
import java.io.File
|
||||
|
||||
abstract class AbstractSerializationIrBytecodeListingTest : AbstractAsmLikeInstructionListingTest() {
|
||||
private val runtimeLibraryPath = getSerializationLibraryRuntimeJar()
|
||||
|
||||
override fun getExpectedTextFileName(wholeFile: File): String {
|
||||
return wholeFile.nameWithoutExtension + ".ir.txt"
|
||||
}
|
||||
|
||||
override fun updateConfiguration(configuration: CompilerConfiguration) {
|
||||
configuration.put(JVMConfigurationKeys.IR, true)
|
||||
}
|
||||
|
||||
override fun setupEnvironment(environment: KotlinCoreEnvironment) {
|
||||
SerializationComponentRegistrar.registerExtensions(environment.project)
|
||||
environment.updateClasspath(listOf(JvmClasspathRoot(runtimeLibraryPath!!)))
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlinx.serialization
|
||||
|
||||
import junit.framework.TestCase
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
import org.jetbrains.kotlin.cli.jvm.config.JvmClasspathRoot
|
||||
import org.jetbrains.kotlin.codegen.AbstractAsmLikeInstructionListingTest
|
||||
import org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationComponentRegistrar
|
||||
|
||||
abstract class AbstractSerializationPluginBytecodeListingTest : AbstractAsmLikeInstructionListingTest() {
|
||||
private val runtimeLibraryPath = getSerializationLibraryRuntimeJar()
|
||||
|
||||
override fun setupEnvironment(environment: KotlinCoreEnvironment) {
|
||||
SerializationComponentRegistrar.registerExtensions(environment.project)
|
||||
environment.updateClasspath(listOf(JvmClasspathRoot(runtimeLibraryPath!!)))
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlinx.serialization
|
||||
|
||||
import org.jetbrains.kotlin.checkers.AbstractDiagnosticsTest
|
||||
import org.jetbrains.kotlin.cli.jvm.config.JvmClasspathRoot
|
||||
import org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationComponentRegistrar
|
||||
import java.io.File
|
||||
|
||||
abstract class AbstractSerializationPluginDiagnosticTest : AbstractDiagnosticsTest() {
|
||||
private val runtimeLibraryPath = getSerializationLibraryRuntimeJar()
|
||||
|
||||
override fun createEnvironment(file: File) = super.createEnvironment(file).apply {
|
||||
SerializationComponentRegistrar.registerExtensions(this.project)
|
||||
updateClasspath(listOf(JvmClasspathRoot(runtimeLibraryPath!!)))
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlinx.serialization
|
||||
|
||||
import junit.framework.TestCase
|
||||
import org.jetbrains.kotlin.utils.PathUtil
|
||||
import org.junit.Test
|
||||
import java.io.File
|
||||
|
||||
class RuntimeLibraryInClasspathTest {
|
||||
private val runtimeLibraryPath = getSerializationLibraryRuntimeJar()
|
||||
|
||||
@Test
|
||||
fun testRuntimeLibraryExists() {
|
||||
TestCase.assertNotNull(
|
||||
"kotlinx-serialization runtime library is not found. Make sure it is present in test classpath",
|
||||
runtimeLibraryPath
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
internal fun getSerializationLibraryRuntimeJar(): File? = try {
|
||||
PathUtil.getResourcePathForClass(Class.forName("kotlinx.serialization.KSerializer"))
|
||||
} catch (e: ClassNotFoundException) {
|
||||
null
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlinx.serialization;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/codegen")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class SerializationIrBytecodeListingTestGenerated extends AbstractSerializationIrBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCodegen() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/codegen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("Basic.kt")
|
||||
public void testBasic() throws Exception {
|
||||
runTest("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/codegen/Basic.kt");
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlinx.serialization;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/codegen")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class SerializationPluginBytecodeListingTestGenerated extends AbstractSerializationPluginBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCodegen() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/codegen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("Basic.kt")
|
||||
public void testBasic() throws Exception {
|
||||
runTest("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/codegen/Basic.kt");
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlinx.serialization;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class SerializationPluginDiagnosticTestGenerated extends AbstractSerializationPluginDiagnosticTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInDiagnostics() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("DuplicateSerialName.kt")
|
||||
public void testDuplicateSerialName() throws Exception {
|
||||
runTest("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/DuplicateSerialName.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NoSuitableCtorInParent.kt")
|
||||
public void testNoSuitableCtorInParent() throws Exception {
|
||||
runTest("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/NoSuitableCtorInParent.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NonSerializable.kt")
|
||||
public void testNonSerializable() throws Exception {
|
||||
runTest("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/NonSerializable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NullabilityIncompatible.kt")
|
||||
public void testNullabilityIncompatible() throws Exception {
|
||||
runTest("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/NullabilityIncompatible.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ParamIsNotProperty.kt")
|
||||
public void testParamIsNotProperty() throws Exception {
|
||||
runTest("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/ParamIsNotProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SerializableIgnored.kt")
|
||||
public void testSerializableIgnored() throws Exception {
|
||||
runTest("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/SerializableIgnored.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Transients.kt")
|
||||
public void testTransients() throws Exception {
|
||||
runTest("plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/Transients.kt");
|
||||
}
|
||||
}
|
||||
+973
@@ -0,0 +1,973 @@
|
||||
public final class ListOfUsers$$serializer : java/lang/Object, kotlinx/serialization/internal/GeneratedSerializer {
|
||||
public final static ListOfUsers$$serializer INSTANCE
|
||||
|
||||
public final static kotlinx.serialization.SerialDescriptor descriptor
|
||||
|
||||
public final static void <clinit>() {
|
||||
NEW
|
||||
DUP
|
||||
INVOKESPECIAL (ListOfUsers$$serializer, <init>, ()V)
|
||||
PUTSTATIC (INSTANCE, LListOfUsers$$serializer;)
|
||||
RETURN
|
||||
}
|
||||
|
||||
private void <init>() {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (12)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
NEW
|
||||
DUP
|
||||
LDC (ListOfUsers)
|
||||
ALOAD (0)
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (kotlinx/serialization/internal/SerialClassDescImpl, <init>, (Ljava/lang/String;Lkotlinx/serialization/internal/GeneratedSerializer;)V)
|
||||
ASTORE (1)
|
||||
ALOAD (1)
|
||||
LDC (list)
|
||||
ICONST_0
|
||||
INVOKEVIRTUAL (kotlinx/serialization/internal/SerialClassDescImpl, addElement, (Ljava/lang/String;Z)V)
|
||||
ALOAD (1)
|
||||
CHECKCAST
|
||||
PUTSTATIC (descriptor, Lkotlinx/serialization/SerialDescriptor;)
|
||||
RETURN
|
||||
LABEL (L2)
|
||||
}
|
||||
|
||||
public kotlinx.serialization.KSerializer[] childSerializers() {
|
||||
LABEL (L0)
|
||||
LINENUMBER (12)
|
||||
ICONST_1
|
||||
ANEWARRAY
|
||||
DUP
|
||||
ICONST_0
|
||||
NEW
|
||||
DUP
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (kotlinx/serialization/internal/ArrayListSerializer, <init>, (Lkotlinx/serialization/KSerializer;)V)
|
||||
AASTORE
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public ListOfUsers deserialize(kotlinx.serialization.Decoder decoder) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (decoder)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
LABEL (L1)
|
||||
LINENUMBER (12)
|
||||
ALOAD (0)
|
||||
INVOKEVIRTUAL (ListOfUsers$$serializer, getDescriptor, ()Lkotlinx/serialization/SerialDescriptor;)
|
||||
ASTORE (2)
|
||||
ICONST_1
|
||||
ISTORE (3)
|
||||
ICONST_0
|
||||
ISTORE (4)
|
||||
ICONST_0
|
||||
ISTORE (5)
|
||||
ACONST_NULL
|
||||
ASTORE (6)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
ANEWARRAY
|
||||
INVOKEINTERFACE (kotlinx/serialization/Decoder, beginStructure, (Lkotlinx/serialization/SerialDescriptor;[Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/CompositeDecoder;)
|
||||
ASTORE (7)
|
||||
LABEL (L2)
|
||||
ILOAD (3)
|
||||
IFEQ (L3)
|
||||
ALOAD (7)
|
||||
ALOAD (2)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeElementIndex, (Lkotlinx/serialization/SerialDescriptor;)I)
|
||||
ISTORE (4)
|
||||
ILOAD (4)
|
||||
TABLESWITCH
|
||||
LABEL (L4)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, throwNpe, ()V)
|
||||
GOTO (L5)
|
||||
LABEL (L6)
|
||||
ICONST_0
|
||||
ISTORE (3)
|
||||
GOTO (L5)
|
||||
LABEL (L7)
|
||||
ALOAD (7)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
NEW
|
||||
DUP
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (kotlinx/serialization/internal/ArrayListSerializer, <init>, (Lkotlinx/serialization/KSerializer;)V)
|
||||
CHECKCAST
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeSerializableElement, (Lkotlinx/serialization/SerialDescriptor;ILkotlinx/serialization/DeserializationStrategy;)Ljava/lang/Object;)
|
||||
CHECKCAST
|
||||
CHECKCAST
|
||||
ASTORE (6)
|
||||
ILOAD (5)
|
||||
ICONST_1
|
||||
IOR
|
||||
ISTORE (5)
|
||||
GOTO (L5)
|
||||
LABEL (L8)
|
||||
NEW
|
||||
DUP
|
||||
ILOAD (4)
|
||||
INVOKESPECIAL (kotlinx/serialization/UnknownFieldException, <init>, (I)V)
|
||||
CHECKCAST
|
||||
ATHROW
|
||||
LABEL (L5)
|
||||
LINENUMBER (13)
|
||||
GOTO (L2)
|
||||
LABEL (L3)
|
||||
ALOAD (7)
|
||||
ALOAD (2)
|
||||
LABEL (L9)
|
||||
LINENUMBER (12)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
NEW
|
||||
DUP
|
||||
ILOAD (5)
|
||||
ALOAD (6)
|
||||
CHECKCAST
|
||||
ACONST_NULL
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (ListOfUsers, <init>, (ILjava/util/List;Lkotlinx/serialization/SerializationConstructorMarker;)V)
|
||||
ARETURN
|
||||
LABEL (L10)
|
||||
}
|
||||
|
||||
public java.lang.Object deserialize(kotlinx.serialization.Decoder decoder) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
INVOKEVIRTUAL (ListOfUsers$$serializer, deserialize, (Lkotlinx/serialization/Decoder;)LListOfUsers;)
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public kotlinx.serialization.SerialDescriptor getDescriptor()
|
||||
|
||||
public ListOfUsers patch(kotlinx.serialization.Decoder decoder, ListOfUsers old)
|
||||
|
||||
public java.lang.Object patch(kotlinx.serialization.Decoder decoder, java.lang.Object old)
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder encoder, ListOfUsers obj) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (encoder)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (2)
|
||||
LDC (obj)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
LABEL (L1)
|
||||
LINENUMBER (12)
|
||||
ALOAD (0)
|
||||
INVOKEVIRTUAL (ListOfUsers$$serializer, getDescriptor, ()Lkotlinx/serialization/SerialDescriptor;)
|
||||
ASTORE (3)
|
||||
ALOAD (1)
|
||||
ALOAD (3)
|
||||
ICONST_0
|
||||
ANEWARRAY
|
||||
INVOKEINTERFACE (kotlinx/serialization/Encoder, beginStructure, (Lkotlinx/serialization/SerialDescriptor;[Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/CompositeEncoder;)
|
||||
ASTORE (4)
|
||||
ALOAD (4)
|
||||
ALOAD (3)
|
||||
ICONST_0
|
||||
NEW
|
||||
DUP
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (kotlinx/serialization/internal/ArrayListSerializer, <init>, (Lkotlinx/serialization/KSerializer;)V)
|
||||
CHECKCAST
|
||||
ALOAD (2)
|
||||
GETFIELD (list, Ljava/util/List;)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, encodeSerializableElement, (Lkotlinx/serialization/SerialDescriptor;ILkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;)V)
|
||||
ALOAD (4)
|
||||
ALOAD (3)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
LABEL (L2)
|
||||
LINENUMBER (13)
|
||||
RETURN
|
||||
LABEL (L3)
|
||||
}
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder encoder, java.lang.Object obj) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
CHECKCAST
|
||||
INVOKEVIRTUAL (ListOfUsers$$serializer, serialize, (Lkotlinx/serialization/Encoder;LListOfUsers;)V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
}
|
||||
|
||||
public final class ListOfUsers$Companion : java/lang/Object {
|
||||
private void <init>() {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (12)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L2)
|
||||
}
|
||||
|
||||
public void <init>(kotlin.jvm.internal.DefaultConstructorMarker marker) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (ListOfUsers$Companion, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public final kotlinx.serialization.KSerializer serializer()
|
||||
}
|
||||
|
||||
public final class ListOfUsers : java/lang/Object {
|
||||
public final static ListOfUsers$Companion Companion
|
||||
|
||||
public final java.util.List list
|
||||
|
||||
public final static void <clinit>() {
|
||||
NEW
|
||||
DUP
|
||||
ACONST_NULL
|
||||
INVOKESPECIAL (ListOfUsers$Companion, <init>, (Lkotlin/jvm/internal/DefaultConstructorMarker;)V)
|
||||
PUTSTATIC (Companion, LListOfUsers$Companion;)
|
||||
RETURN
|
||||
}
|
||||
|
||||
public void <init>(java.util.List list) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (list)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (12)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
LABEL (L2)
|
||||
LINENUMBER (13)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
PUTFIELD (list, Ljava/util/List;)
|
||||
RETURN
|
||||
LABEL (L3)
|
||||
}
|
||||
|
||||
public void <init>(int seen1, java.util.List list, kotlinx.serialization.SerializationConstructorMarker serializationConstructorMarker) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (12)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
ICONST_0
|
||||
ILOAD (1)
|
||||
ICONST_1
|
||||
IAND
|
||||
IF_ICMPNE (L2)
|
||||
NEW
|
||||
DUP
|
||||
LDC (list)
|
||||
INVOKESPECIAL (kotlinx/serialization/MissingFieldException, <init>, (Ljava/lang/String;)V)
|
||||
CHECKCAST
|
||||
ATHROW
|
||||
LABEL (L2)
|
||||
ALOAD (0)
|
||||
ALOAD (2)
|
||||
PUTFIELD (list, Ljava/util/List;)
|
||||
LABEL (L3)
|
||||
LINENUMBER (13)
|
||||
RETURN
|
||||
LABEL (L4)
|
||||
}
|
||||
|
||||
public final java.util.List getList()
|
||||
}
|
||||
|
||||
public final class OptionalUser$$serializer : java/lang/Object, kotlinx/serialization/internal/GeneratedSerializer {
|
||||
public final static OptionalUser$$serializer INSTANCE
|
||||
|
||||
public final static kotlinx.serialization.SerialDescriptor descriptor
|
||||
|
||||
public final static void <clinit>() {
|
||||
NEW
|
||||
DUP
|
||||
INVOKESPECIAL (OptionalUser$$serializer, <init>, ()V)
|
||||
PUTSTATIC (INSTANCE, LOptionalUser$$serializer;)
|
||||
RETURN
|
||||
}
|
||||
|
||||
private void <init>() {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (9)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
NEW
|
||||
DUP
|
||||
LDC (OptionalUser)
|
||||
ALOAD (0)
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (kotlinx/serialization/internal/SerialClassDescImpl, <init>, (Ljava/lang/String;Lkotlinx/serialization/internal/GeneratedSerializer;)V)
|
||||
ASTORE (1)
|
||||
ALOAD (1)
|
||||
LDC (user)
|
||||
ICONST_1
|
||||
INVOKEVIRTUAL (kotlinx/serialization/internal/SerialClassDescImpl, addElement, (Ljava/lang/String;Z)V)
|
||||
ALOAD (1)
|
||||
CHECKCAST
|
||||
PUTSTATIC (descriptor, Lkotlinx/serialization/SerialDescriptor;)
|
||||
RETURN
|
||||
LABEL (L2)
|
||||
}
|
||||
|
||||
public kotlinx.serialization.KSerializer[] childSerializers() {
|
||||
LABEL (L0)
|
||||
LINENUMBER (9)
|
||||
ICONST_1
|
||||
ANEWARRAY
|
||||
DUP
|
||||
ICONST_0
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
AASTORE
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public OptionalUser deserialize(kotlinx.serialization.Decoder decoder) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (decoder)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
LABEL (L1)
|
||||
LINENUMBER (9)
|
||||
ALOAD (0)
|
||||
INVOKEVIRTUAL (OptionalUser$$serializer, getDescriptor, ()Lkotlinx/serialization/SerialDescriptor;)
|
||||
ASTORE (2)
|
||||
ICONST_1
|
||||
ISTORE (3)
|
||||
ICONST_0
|
||||
ISTORE (4)
|
||||
ICONST_0
|
||||
ISTORE (5)
|
||||
ACONST_NULL
|
||||
ASTORE (6)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
ANEWARRAY
|
||||
INVOKEINTERFACE (kotlinx/serialization/Decoder, beginStructure, (Lkotlinx/serialization/SerialDescriptor;[Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/CompositeDecoder;)
|
||||
ASTORE (7)
|
||||
LABEL (L2)
|
||||
ILOAD (3)
|
||||
IFEQ (L3)
|
||||
ALOAD (7)
|
||||
ALOAD (2)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeElementIndex, (Lkotlinx/serialization/SerialDescriptor;)I)
|
||||
ISTORE (4)
|
||||
ILOAD (4)
|
||||
TABLESWITCH
|
||||
LABEL (L4)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, throwNpe, ()V)
|
||||
GOTO (L5)
|
||||
LABEL (L6)
|
||||
ICONST_0
|
||||
ISTORE (3)
|
||||
GOTO (L5)
|
||||
LABEL (L7)
|
||||
ALOAD (7)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeSerializableElement, (Lkotlinx/serialization/SerialDescriptor;ILkotlinx/serialization/DeserializationStrategy;)Ljava/lang/Object;)
|
||||
CHECKCAST
|
||||
CHECKCAST
|
||||
ASTORE (6)
|
||||
ILOAD (5)
|
||||
ICONST_1
|
||||
IOR
|
||||
ISTORE (5)
|
||||
GOTO (L5)
|
||||
LABEL (L8)
|
||||
NEW
|
||||
DUP
|
||||
ILOAD (4)
|
||||
INVOKESPECIAL (kotlinx/serialization/UnknownFieldException, <init>, (I)V)
|
||||
CHECKCAST
|
||||
ATHROW
|
||||
LABEL (L5)
|
||||
LINENUMBER (10)
|
||||
GOTO (L2)
|
||||
LABEL (L3)
|
||||
ALOAD (7)
|
||||
ALOAD (2)
|
||||
LABEL (L9)
|
||||
LINENUMBER (9)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
NEW
|
||||
DUP
|
||||
ILOAD (5)
|
||||
ALOAD (6)
|
||||
CHECKCAST
|
||||
ACONST_NULL
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (OptionalUser, <init>, (ILUser;Lkotlinx/serialization/SerializationConstructorMarker;)V)
|
||||
ARETURN
|
||||
LABEL (L10)
|
||||
}
|
||||
|
||||
public java.lang.Object deserialize(kotlinx.serialization.Decoder decoder) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
INVOKEVIRTUAL (OptionalUser$$serializer, deserialize, (Lkotlinx/serialization/Decoder;)LOptionalUser;)
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public kotlinx.serialization.SerialDescriptor getDescriptor()
|
||||
|
||||
public OptionalUser patch(kotlinx.serialization.Decoder decoder, OptionalUser old)
|
||||
|
||||
public java.lang.Object patch(kotlinx.serialization.Decoder decoder, java.lang.Object old)
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder encoder, OptionalUser obj) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (encoder)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (2)
|
||||
LDC (obj)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
LABEL (L1)
|
||||
LINENUMBER (9)
|
||||
ALOAD (0)
|
||||
INVOKEVIRTUAL (OptionalUser$$serializer, getDescriptor, ()Lkotlinx/serialization/SerialDescriptor;)
|
||||
ASTORE (3)
|
||||
ALOAD (1)
|
||||
ALOAD (3)
|
||||
ICONST_0
|
||||
ANEWARRAY
|
||||
INVOKEINTERFACE (kotlinx/serialization/Encoder, beginStructure, (Lkotlinx/serialization/SerialDescriptor;[Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/CompositeEncoder;)
|
||||
ASTORE (4)
|
||||
ALOAD (2)
|
||||
GETFIELD (user, LUser;)
|
||||
NEW
|
||||
DUP
|
||||
LABEL (L2)
|
||||
LINENUMBER (10)
|
||||
LDC ()
|
||||
LDC ()
|
||||
INVOKESPECIAL (User, <init>, (Ljava/lang/String;Ljava/lang/String;)V)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, areEqual, (Ljava/lang/Object;Ljava/lang/Object;)Z)
|
||||
IFNE (L3)
|
||||
LABEL (L4)
|
||||
LINENUMBER (9)
|
||||
ICONST_1
|
||||
GOTO (L5)
|
||||
LABEL (L3)
|
||||
ALOAD (4)
|
||||
ALOAD (3)
|
||||
ICONST_0
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, shouldEncodeElementDefault, (Lkotlinx/serialization/SerialDescriptor;I)Z)
|
||||
LABEL (L5)
|
||||
IFEQ (L6)
|
||||
ALOAD (4)
|
||||
ALOAD (3)
|
||||
ICONST_0
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
ALOAD (2)
|
||||
GETFIELD (user, LUser;)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, encodeSerializableElement, (Lkotlinx/serialization/SerialDescriptor;ILkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;)V)
|
||||
GOTO (L6)
|
||||
LABEL (L6)
|
||||
ALOAD (4)
|
||||
ALOAD (3)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
LABEL (L7)
|
||||
LINENUMBER (10)
|
||||
RETURN
|
||||
LABEL (L8)
|
||||
}
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder encoder, java.lang.Object obj) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
CHECKCAST
|
||||
INVOKEVIRTUAL (OptionalUser$$serializer, serialize, (Lkotlinx/serialization/Encoder;LOptionalUser;)V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
}
|
||||
|
||||
public final class OptionalUser$Companion : java/lang/Object {
|
||||
private void <init>() {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (9)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L2)
|
||||
}
|
||||
|
||||
public void <init>(kotlin.jvm.internal.DefaultConstructorMarker marker) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (OptionalUser$Companion, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public final kotlinx.serialization.KSerializer serializer()
|
||||
}
|
||||
|
||||
public final class OptionalUser : java/lang/Object {
|
||||
public final static OptionalUser$Companion Companion
|
||||
|
||||
public final User user
|
||||
|
||||
public final static void <clinit>() {
|
||||
NEW
|
||||
DUP
|
||||
ACONST_NULL
|
||||
INVOKESPECIAL (OptionalUser$Companion, <init>, (Lkotlin/jvm/internal/DefaultConstructorMarker;)V)
|
||||
PUTSTATIC (Companion, LOptionalUser$Companion;)
|
||||
RETURN
|
||||
}
|
||||
|
||||
public void <init>(User user) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (user)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (9)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
LABEL (L2)
|
||||
LINENUMBER (10)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
PUTFIELD (user, LUser;)
|
||||
RETURN
|
||||
LABEL (L3)
|
||||
}
|
||||
|
||||
public void <init>(User user, int $mask0, kotlin.jvm.internal.DefaultConstructorMarker $marker) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (10)
|
||||
ILOAD (2)
|
||||
ICONST_1
|
||||
IAND
|
||||
IFEQ (L1)
|
||||
NEW
|
||||
DUP
|
||||
LDC ()
|
||||
LDC ()
|
||||
INVOKESPECIAL (User, <init>, (Ljava/lang/String;Ljava/lang/String;)V)
|
||||
GOTO (L2)
|
||||
LABEL (L1)
|
||||
ALOAD (1)
|
||||
LABEL (L2)
|
||||
ASTORE (4)
|
||||
ALOAD (0)
|
||||
ALOAD (4)
|
||||
INVOKESPECIAL (OptionalUser, <init>, (LUser;)V)
|
||||
RETURN
|
||||
LABEL (L3)
|
||||
}
|
||||
|
||||
public void <init>(int seen1, User user, kotlinx.serialization.SerializationConstructorMarker serializationConstructorMarker) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (9)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
ICONST_0
|
||||
ILOAD (1)
|
||||
ICONST_1
|
||||
IAND
|
||||
IF_ICMPNE (L2)
|
||||
ALOAD (0)
|
||||
NEW
|
||||
DUP
|
||||
LABEL (L3)
|
||||
LINENUMBER (10)
|
||||
LDC ()
|
||||
LDC ()
|
||||
INVOKESPECIAL (User, <init>, (Ljava/lang/String;Ljava/lang/String;)V)
|
||||
PUTFIELD (user, LUser;)
|
||||
GOTO (L4)
|
||||
LABEL (L2)
|
||||
LINENUMBER (9)
|
||||
ALOAD (0)
|
||||
ALOAD (2)
|
||||
PUTFIELD (user, LUser;)
|
||||
LABEL (L4)
|
||||
LINENUMBER (10)
|
||||
RETURN
|
||||
LABEL (L5)
|
||||
}
|
||||
|
||||
public void <init>() {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
ACONST_NULL
|
||||
ICONST_1
|
||||
ACONST_NULL
|
||||
INVOKESPECIAL (OptionalUser, <init>, (LUser;ILkotlin/jvm/internal/DefaultConstructorMarker;)V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public final User getUser()
|
||||
}
|
||||
|
||||
public final class User$$serializer : java/lang/Object, kotlinx/serialization/internal/GeneratedSerializer {
|
||||
public final static User$$serializer INSTANCE
|
||||
|
||||
public final static kotlinx.serialization.SerialDescriptor descriptor
|
||||
|
||||
public final static void <clinit>() {
|
||||
NEW
|
||||
DUP
|
||||
INVOKESPECIAL (User$$serializer, <init>, ()V)
|
||||
PUTSTATIC (INSTANCE, LUser$$serializer;)
|
||||
RETURN
|
||||
}
|
||||
|
||||
private void <init>() {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (6)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
NEW
|
||||
DUP
|
||||
LDC (User)
|
||||
ALOAD (0)
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (kotlinx/serialization/internal/SerialClassDescImpl, <init>, (Ljava/lang/String;Lkotlinx/serialization/internal/GeneratedSerializer;)V)
|
||||
ASTORE (1)
|
||||
ALOAD (1)
|
||||
LDC (firstName)
|
||||
ICONST_0
|
||||
INVOKEVIRTUAL (kotlinx/serialization/internal/SerialClassDescImpl, addElement, (Ljava/lang/String;Z)V)
|
||||
ALOAD (1)
|
||||
LDC (lastName)
|
||||
ICONST_0
|
||||
INVOKEVIRTUAL (kotlinx/serialization/internal/SerialClassDescImpl, addElement, (Ljava/lang/String;Z)V)
|
||||
ALOAD (1)
|
||||
CHECKCAST
|
||||
PUTSTATIC (descriptor, Lkotlinx/serialization/SerialDescriptor;)
|
||||
RETURN
|
||||
LABEL (L2)
|
||||
}
|
||||
|
||||
public kotlinx.serialization.KSerializer[] childSerializers() {
|
||||
LABEL (L0)
|
||||
LINENUMBER (6)
|
||||
ICONST_2
|
||||
ANEWARRAY
|
||||
DUP
|
||||
ICONST_0
|
||||
GETSTATIC (INSTANCE, Lkotlinx/serialization/internal/StringSerializer;)
|
||||
CHECKCAST
|
||||
AASTORE
|
||||
DUP
|
||||
ICONST_1
|
||||
GETSTATIC (INSTANCE, Lkotlinx/serialization/internal/StringSerializer;)
|
||||
CHECKCAST
|
||||
AASTORE
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public User deserialize(kotlinx.serialization.Decoder decoder) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (decoder)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
LABEL (L1)
|
||||
LINENUMBER (6)
|
||||
ALOAD (0)
|
||||
INVOKEVIRTUAL (User$$serializer, getDescriptor, ()Lkotlinx/serialization/SerialDescriptor;)
|
||||
ASTORE (2)
|
||||
ICONST_1
|
||||
ISTORE (3)
|
||||
ICONST_0
|
||||
ISTORE (4)
|
||||
ICONST_0
|
||||
ISTORE (5)
|
||||
ACONST_NULL
|
||||
ASTORE (6)
|
||||
ACONST_NULL
|
||||
ASTORE (7)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
ANEWARRAY
|
||||
INVOKEINTERFACE (kotlinx/serialization/Decoder, beginStructure, (Lkotlinx/serialization/SerialDescriptor;[Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/CompositeDecoder;)
|
||||
ASTORE (8)
|
||||
LABEL (L2)
|
||||
ILOAD (3)
|
||||
IFEQ (L3)
|
||||
ALOAD (8)
|
||||
ALOAD (2)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeElementIndex, (Lkotlinx/serialization/SerialDescriptor;)I)
|
||||
ISTORE (4)
|
||||
ILOAD (4)
|
||||
TABLESWITCH
|
||||
LABEL (L4)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, throwNpe, ()V)
|
||||
GOTO (L5)
|
||||
LABEL (L6)
|
||||
ICONST_0
|
||||
ISTORE (3)
|
||||
GOTO (L5)
|
||||
LABEL (L7)
|
||||
ALOAD (8)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeStringElement, (Lkotlinx/serialization/SerialDescriptor;I)Ljava/lang/String;)
|
||||
CHECKCAST
|
||||
ASTORE (6)
|
||||
ILOAD (5)
|
||||
ICONST_1
|
||||
IOR
|
||||
ISTORE (5)
|
||||
GOTO (L5)
|
||||
LABEL (L8)
|
||||
ALOAD (8)
|
||||
ALOAD (2)
|
||||
ICONST_1
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeStringElement, (Lkotlinx/serialization/SerialDescriptor;I)Ljava/lang/String;)
|
||||
CHECKCAST
|
||||
ASTORE (7)
|
||||
ILOAD (5)
|
||||
ICONST_2
|
||||
IOR
|
||||
ISTORE (5)
|
||||
GOTO (L5)
|
||||
LABEL (L9)
|
||||
NEW
|
||||
DUP
|
||||
ILOAD (4)
|
||||
INVOKESPECIAL (kotlinx/serialization/UnknownFieldException, <init>, (I)V)
|
||||
CHECKCAST
|
||||
ATHROW
|
||||
LABEL (L5)
|
||||
LINENUMBER (7)
|
||||
GOTO (L2)
|
||||
LABEL (L3)
|
||||
ALOAD (8)
|
||||
ALOAD (2)
|
||||
LABEL (L10)
|
||||
LINENUMBER (6)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
NEW
|
||||
DUP
|
||||
ILOAD (5)
|
||||
ALOAD (6)
|
||||
CHECKCAST
|
||||
ALOAD (7)
|
||||
CHECKCAST
|
||||
ACONST_NULL
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (User, <init>, (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/SerializationConstructorMarker;)V)
|
||||
ARETURN
|
||||
LABEL (L11)
|
||||
}
|
||||
|
||||
public java.lang.Object deserialize(kotlinx.serialization.Decoder decoder) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
INVOKEVIRTUAL (User$$serializer, deserialize, (Lkotlinx/serialization/Decoder;)LUser;)
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public kotlinx.serialization.SerialDescriptor getDescriptor()
|
||||
|
||||
public User patch(kotlinx.serialization.Decoder decoder, User old)
|
||||
|
||||
public java.lang.Object patch(kotlinx.serialization.Decoder decoder, java.lang.Object old)
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder encoder, User obj) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (encoder)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (2)
|
||||
LDC (obj)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
LABEL (L1)
|
||||
LINENUMBER (6)
|
||||
ALOAD (0)
|
||||
INVOKEVIRTUAL (User$$serializer, getDescriptor, ()Lkotlinx/serialization/SerialDescriptor;)
|
||||
ASTORE (3)
|
||||
ALOAD (1)
|
||||
ALOAD (3)
|
||||
ICONST_0
|
||||
ANEWARRAY
|
||||
INVOKEINTERFACE (kotlinx/serialization/Encoder, beginStructure, (Lkotlinx/serialization/SerialDescriptor;[Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/CompositeEncoder;)
|
||||
ASTORE (4)
|
||||
ALOAD (4)
|
||||
ALOAD (3)
|
||||
ICONST_0
|
||||
ALOAD (2)
|
||||
GETFIELD (firstName, Ljava/lang/String;)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, encodeStringElement, (Lkotlinx/serialization/SerialDescriptor;ILjava/lang/String;)V)
|
||||
ALOAD (4)
|
||||
ALOAD (3)
|
||||
ICONST_1
|
||||
ALOAD (2)
|
||||
GETFIELD (lastName, Ljava/lang/String;)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, encodeStringElement, (Lkotlinx/serialization/SerialDescriptor;ILjava/lang/String;)V)
|
||||
ALOAD (4)
|
||||
ALOAD (3)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
LABEL (L2)
|
||||
LINENUMBER (7)
|
||||
RETURN
|
||||
LABEL (L3)
|
||||
}
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder encoder, java.lang.Object obj) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
CHECKCAST
|
||||
INVOKEVIRTUAL (User$$serializer, serialize, (Lkotlinx/serialization/Encoder;LUser;)V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
}
|
||||
|
||||
public final class User$Companion : java/lang/Object {
|
||||
private void <init>() {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (6)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L2)
|
||||
}
|
||||
|
||||
public void <init>(kotlin.jvm.internal.DefaultConstructorMarker marker) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (User$Companion, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public final kotlinx.serialization.KSerializer serializer()
|
||||
}
|
||||
|
||||
public final class User : java/lang/Object {
|
||||
public final static User$Companion Companion
|
||||
|
||||
public final java.lang.String firstName
|
||||
|
||||
public final java.lang.String lastName
|
||||
|
||||
public final static void <clinit>() {
|
||||
NEW
|
||||
DUP
|
||||
ACONST_NULL
|
||||
INVOKESPECIAL (User$Companion, <init>, (Lkotlin/jvm/internal/DefaultConstructorMarker;)V)
|
||||
PUTSTATIC (Companion, LUser$Companion;)
|
||||
RETURN
|
||||
}
|
||||
|
||||
public void <init>(java.lang.String firstName, java.lang.String lastName) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (firstName)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (2)
|
||||
LDC (lastName)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (6)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
LABEL (L2)
|
||||
LINENUMBER (7)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
PUTFIELD (firstName, Ljava/lang/String;)
|
||||
ALOAD (0)
|
||||
ALOAD (2)
|
||||
PUTFIELD (lastName, Ljava/lang/String;)
|
||||
RETURN
|
||||
LABEL (L3)
|
||||
}
|
||||
|
||||
public void <init>(int seen1, java.lang.String firstName, java.lang.String lastName, kotlinx.serialization.SerializationConstructorMarker serializationConstructorMarker) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (6)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
ICONST_0
|
||||
ILOAD (1)
|
||||
ICONST_1
|
||||
IAND
|
||||
IF_ICMPNE (L2)
|
||||
NEW
|
||||
DUP
|
||||
LDC (firstName)
|
||||
INVOKESPECIAL (kotlinx/serialization/MissingFieldException, <init>, (Ljava/lang/String;)V)
|
||||
CHECKCAST
|
||||
ATHROW
|
||||
LABEL (L2)
|
||||
ALOAD (0)
|
||||
ALOAD (2)
|
||||
PUTFIELD (firstName, Ljava/lang/String;)
|
||||
LABEL (L3)
|
||||
LINENUMBER (7)
|
||||
NOP
|
||||
LABEL (L4)
|
||||
LINENUMBER (6)
|
||||
ICONST_0
|
||||
ILOAD (1)
|
||||
ICONST_2
|
||||
IAND
|
||||
IF_ICMPNE (L5)
|
||||
NEW
|
||||
DUP
|
||||
LDC (lastName)
|
||||
INVOKESPECIAL (kotlinx/serialization/MissingFieldException, <init>, (Ljava/lang/String;)V)
|
||||
CHECKCAST
|
||||
ATHROW
|
||||
LABEL (L5)
|
||||
ALOAD (0)
|
||||
ALOAD (3)
|
||||
PUTFIELD (lastName, Ljava/lang/String;)
|
||||
LABEL (L6)
|
||||
LINENUMBER (7)
|
||||
RETURN
|
||||
LABEL (L7)
|
||||
}
|
||||
|
||||
public final java.lang.String getFirstName()
|
||||
|
||||
public final java.lang.String getLastName()
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// CURIOUS_ABOUT serialize, deserialize, write$Self, childSerializers, <init>, <clinit>
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
class User(val firstName: String, val lastName: String)
|
||||
|
||||
@Serializable
|
||||
class OptionalUser(val user: User = User("", ""))
|
||||
|
||||
@Serializable
|
||||
class ListOfUsers(val list: List<User>)
|
||||
+942
@@ -0,0 +1,942 @@
|
||||
public final class ListOfUsers$$serializer : java/lang/Object, kotlinx/serialization/internal/GeneratedSerializer {
|
||||
private final static kotlinx.serialization.SerialDescriptor $$serialDesc
|
||||
|
||||
public final static ListOfUsers$$serializer INSTANCE
|
||||
|
||||
static void <clinit>() {
|
||||
LABEL (L0)
|
||||
LINENUMBER (13)
|
||||
NEW
|
||||
DUP
|
||||
INVOKESPECIAL (ListOfUsers$$serializer, <init>, ()V)
|
||||
ASTORE (0)
|
||||
ALOAD (0)
|
||||
PUTSTATIC (INSTANCE, LListOfUsers$$serializer;)
|
||||
NEW
|
||||
DUP
|
||||
LDC (ListOfUsers)
|
||||
GETSTATIC (INSTANCE, LListOfUsers$$serializer;)
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (kotlinx/serialization/internal/SerialClassDescImpl, <init>, (Ljava/lang/String;Lkotlinx/serialization/internal/GeneratedSerializer;)V)
|
||||
ASTORE (0)
|
||||
ALOAD (0)
|
||||
LDC (list)
|
||||
ICONST_0
|
||||
INVOKEVIRTUAL (kotlinx/serialization/internal/SerialClassDescImpl, addElement, (Ljava/lang/String;Z)V)
|
||||
ALOAD (0)
|
||||
PUTSTATIC ($$serialDesc, Lkotlinx/serialization/SerialDescriptor;)
|
||||
RETURN
|
||||
}
|
||||
|
||||
private void <init>() {
|
||||
LABEL (L0)
|
||||
LINENUMBER (13)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public kotlinx.serialization.KSerializer[] childSerializers() {
|
||||
LABEL (L0)
|
||||
ICONST_1
|
||||
ANEWARRAY
|
||||
DUP
|
||||
ICONST_0
|
||||
NEW
|
||||
DUP
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (kotlinx/serialization/internal/ArrayListSerializer, <init>, (Lkotlinx/serialization/KSerializer;)V)
|
||||
AASTORE
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public ListOfUsers deserialize(kotlinx.serialization.Decoder decoder) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (decoder)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
GETSTATIC ($$serialDesc, Lkotlinx/serialization/SerialDescriptor;)
|
||||
ASTORE (2)
|
||||
ICONST_0
|
||||
ISTORE (4)
|
||||
ICONST_0
|
||||
ISTORE (5)
|
||||
ACONST_NULL
|
||||
ASTORE (6)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
ANEWARRAY
|
||||
INVOKEINTERFACE (kotlinx/serialization/Decoder, beginStructure, (Lkotlinx/serialization/SerialDescriptor;[Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/CompositeDecoder;)
|
||||
ASTORE (1)
|
||||
LABEL (L1)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeElementIndex, (Lkotlinx/serialization/SerialDescriptor;)I)
|
||||
ISTORE (3)
|
||||
ILOAD (3)
|
||||
TABLESWITCH
|
||||
LABEL (L2)
|
||||
ICONST_1
|
||||
ISTORE (4)
|
||||
LABEL (L3)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
NEW
|
||||
DUP
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (kotlinx/serialization/internal/ArrayListSerializer, <init>, (Lkotlinx/serialization/KSerializer;)V)
|
||||
ILOAD (5)
|
||||
ICONST_1
|
||||
IAND
|
||||
IFEQ (L4)
|
||||
ALOAD (6)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, updateSerializableElement, (Lkotlinx/serialization/SerialDescriptor;ILkotlinx/serialization/DeserializationStrategy;Ljava/lang/Object;)Ljava/lang/Object;)
|
||||
GOTO (L5)
|
||||
LABEL (L4)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeSerializableElement, (Lkotlinx/serialization/SerialDescriptor;ILkotlinx/serialization/DeserializationStrategy;)Ljava/lang/Object;)
|
||||
LABEL (L5)
|
||||
CHECKCAST
|
||||
ASTORE (6)
|
||||
ILOAD (5)
|
||||
ICONST_1
|
||||
IOR
|
||||
ISTORE (5)
|
||||
ILOAD (4)
|
||||
IFEQ (L1)
|
||||
LABEL (L6)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
NEW
|
||||
DUP
|
||||
ILOAD (5)
|
||||
ALOAD (6)
|
||||
ACONST_NULL
|
||||
INVOKESPECIAL (ListOfUsers, <init>, (ILjava/util/List;Lkotlinx/serialization/SerializationConstructorMarker;)V)
|
||||
ARETURN
|
||||
LABEL (L7)
|
||||
NEW
|
||||
DUP
|
||||
ILOAD (3)
|
||||
INVOKESPECIAL (kotlinx/serialization/UnknownFieldException, <init>, (I)V)
|
||||
CHECKCAST
|
||||
ATHROW
|
||||
LABEL (L8)
|
||||
}
|
||||
|
||||
public java.lang.Object deserialize(kotlinx.serialization.Decoder p0) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (13)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
INVOKEVIRTUAL (ListOfUsers$$serializer, deserialize, (Lkotlinx/serialization/Decoder;)LListOfUsers;)
|
||||
ARETURN
|
||||
}
|
||||
|
||||
public kotlinx.serialization.SerialDescriptor getDescriptor()
|
||||
|
||||
public ListOfUsers patch(kotlinx.serialization.Decoder decoder, ListOfUsers old)
|
||||
|
||||
public java.lang.Object patch(kotlinx.serialization.Decoder p0, java.lang.Object p1)
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder encoder, ListOfUsers obj) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (encoder)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (2)
|
||||
LDC (obj)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
GETSTATIC ($$serialDesc, Lkotlinx/serialization/SerialDescriptor;)
|
||||
ASTORE (3)
|
||||
ALOAD (1)
|
||||
ALOAD (3)
|
||||
ICONST_0
|
||||
ANEWARRAY
|
||||
INVOKEINTERFACE (kotlinx/serialization/Encoder, beginStructure, (Lkotlinx/serialization/SerialDescriptor;[Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/CompositeEncoder;)
|
||||
ASTORE (1)
|
||||
ALOAD (2)
|
||||
ALOAD (1)
|
||||
ALOAD (3)
|
||||
INVOKESTATIC (ListOfUsers, write$Self, (LListOfUsers;Lkotlinx/serialization/CompositeEncoder;Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
ALOAD (1)
|
||||
ALOAD (3)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder p0, java.lang.Object p1) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (13)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
CHECKCAST
|
||||
INVOKEVIRTUAL (ListOfUsers$$serializer, serialize, (Lkotlinx/serialization/Encoder;LListOfUsers;)V)
|
||||
RETURN
|
||||
}
|
||||
}
|
||||
|
||||
public final class ListOfUsers$Companion : java/lang/Object {
|
||||
private void <init>() {
|
||||
LABEL (L0)
|
||||
LINENUMBER (13)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public void <init>(kotlin.jvm.internal.DefaultConstructorMarker $constructor_marker) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (13)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (ListOfUsers$Companion, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public final kotlinx.serialization.KSerializer serializer()
|
||||
}
|
||||
|
||||
public final class ListOfUsers : java/lang/Object {
|
||||
public final static ListOfUsers$Companion Companion
|
||||
|
||||
private final java.util.List list
|
||||
|
||||
static void <clinit>() {
|
||||
NEW
|
||||
DUP
|
||||
ACONST_NULL
|
||||
INVOKESPECIAL (ListOfUsers$Companion, <init>, (Lkotlin/jvm/internal/DefaultConstructorMarker;)V)
|
||||
PUTSTATIC (Companion, LListOfUsers$Companion;)
|
||||
RETURN
|
||||
}
|
||||
|
||||
public void <init>(java.util.List list) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (list)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
LABEL (L1)
|
||||
LINENUMBER (13)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
PUTFIELD (list, Ljava/util/List;)
|
||||
RETURN
|
||||
LABEL (L2)
|
||||
}
|
||||
|
||||
public void <init>(int seen1, java.util.List list, kotlinx.serialization.SerializationConstructorMarker serializationConstructorMarker) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
ILOAD (1)
|
||||
ICONST_1
|
||||
IAND
|
||||
IFNE (L1)
|
||||
NEW
|
||||
DUP
|
||||
LDC (list)
|
||||
INVOKESPECIAL (kotlinx/serialization/MissingFieldException, <init>, (Ljava/lang/String;)V)
|
||||
CHECKCAST
|
||||
ATHROW
|
||||
LABEL (L1)
|
||||
ALOAD (0)
|
||||
ALOAD (2)
|
||||
PUTFIELD (list, Ljava/util/List;)
|
||||
RETURN
|
||||
LABEL (L2)
|
||||
}
|
||||
|
||||
public final java.util.List getList()
|
||||
|
||||
public final static void write$Self(ListOfUsers self, kotlinx.serialization.CompositeEncoder output, kotlinx.serialization.SerialDescriptor serialDesc) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
LDC (self)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (1)
|
||||
LDC (output)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (2)
|
||||
LDC (serialDesc)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
NEW
|
||||
DUP
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (kotlinx/serialization/internal/ArrayListSerializer, <init>, (Lkotlinx/serialization/KSerializer;)V)
|
||||
ALOAD (0)
|
||||
GETFIELD (list, Ljava/util/List;)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, encodeSerializableElement, (Lkotlinx/serialization/SerialDescriptor;ILkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;)V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
}
|
||||
|
||||
public final class OptionalUser$$serializer : java/lang/Object, kotlinx/serialization/internal/GeneratedSerializer {
|
||||
private final static kotlinx.serialization.SerialDescriptor $$serialDesc
|
||||
|
||||
public final static OptionalUser$$serializer INSTANCE
|
||||
|
||||
static void <clinit>() {
|
||||
LABEL (L0)
|
||||
LINENUMBER (10)
|
||||
NEW
|
||||
DUP
|
||||
INVOKESPECIAL (OptionalUser$$serializer, <init>, ()V)
|
||||
ASTORE (0)
|
||||
ALOAD (0)
|
||||
PUTSTATIC (INSTANCE, LOptionalUser$$serializer;)
|
||||
NEW
|
||||
DUP
|
||||
LDC (OptionalUser)
|
||||
GETSTATIC (INSTANCE, LOptionalUser$$serializer;)
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (kotlinx/serialization/internal/SerialClassDescImpl, <init>, (Ljava/lang/String;Lkotlinx/serialization/internal/GeneratedSerializer;)V)
|
||||
ASTORE (0)
|
||||
ALOAD (0)
|
||||
LDC (user)
|
||||
ICONST_1
|
||||
INVOKEVIRTUAL (kotlinx/serialization/internal/SerialClassDescImpl, addElement, (Ljava/lang/String;Z)V)
|
||||
ALOAD (0)
|
||||
PUTSTATIC ($$serialDesc, Lkotlinx/serialization/SerialDescriptor;)
|
||||
RETURN
|
||||
}
|
||||
|
||||
private void <init>() {
|
||||
LABEL (L0)
|
||||
LINENUMBER (10)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public kotlinx.serialization.KSerializer[] childSerializers() {
|
||||
LABEL (L0)
|
||||
ICONST_1
|
||||
ANEWARRAY
|
||||
DUP
|
||||
ICONST_0
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
AASTORE
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public OptionalUser deserialize(kotlinx.serialization.Decoder decoder) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (decoder)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
GETSTATIC ($$serialDesc, Lkotlinx/serialization/SerialDescriptor;)
|
||||
ASTORE (2)
|
||||
ICONST_0
|
||||
ISTORE (4)
|
||||
ICONST_0
|
||||
ISTORE (5)
|
||||
ACONST_NULL
|
||||
ASTORE (6)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
ANEWARRAY
|
||||
INVOKEINTERFACE (kotlinx/serialization/Decoder, beginStructure, (Lkotlinx/serialization/SerialDescriptor;[Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/CompositeDecoder;)
|
||||
ASTORE (1)
|
||||
LABEL (L1)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeElementIndex, (Lkotlinx/serialization/SerialDescriptor;)I)
|
||||
ISTORE (3)
|
||||
ILOAD (3)
|
||||
TABLESWITCH
|
||||
LABEL (L2)
|
||||
ICONST_1
|
||||
ISTORE (4)
|
||||
LABEL (L3)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
ILOAD (5)
|
||||
ICONST_1
|
||||
IAND
|
||||
IFEQ (L4)
|
||||
ALOAD (6)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, updateSerializableElement, (Lkotlinx/serialization/SerialDescriptor;ILkotlinx/serialization/DeserializationStrategy;Ljava/lang/Object;)Ljava/lang/Object;)
|
||||
GOTO (L5)
|
||||
LABEL (L4)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeSerializableElement, (Lkotlinx/serialization/SerialDescriptor;ILkotlinx/serialization/DeserializationStrategy;)Ljava/lang/Object;)
|
||||
LABEL (L5)
|
||||
CHECKCAST
|
||||
ASTORE (6)
|
||||
ILOAD (5)
|
||||
ICONST_1
|
||||
IOR
|
||||
ISTORE (5)
|
||||
ILOAD (4)
|
||||
IFEQ (L1)
|
||||
LABEL (L6)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
NEW
|
||||
DUP
|
||||
ILOAD (5)
|
||||
ALOAD (6)
|
||||
ACONST_NULL
|
||||
INVOKESPECIAL (OptionalUser, <init>, (ILUser;Lkotlinx/serialization/SerializationConstructorMarker;)V)
|
||||
ARETURN
|
||||
LABEL (L7)
|
||||
NEW
|
||||
DUP
|
||||
ILOAD (3)
|
||||
INVOKESPECIAL (kotlinx/serialization/UnknownFieldException, <init>, (I)V)
|
||||
CHECKCAST
|
||||
ATHROW
|
||||
LABEL (L8)
|
||||
}
|
||||
|
||||
public java.lang.Object deserialize(kotlinx.serialization.Decoder p0) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (10)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
INVOKEVIRTUAL (OptionalUser$$serializer, deserialize, (Lkotlinx/serialization/Decoder;)LOptionalUser;)
|
||||
ARETURN
|
||||
}
|
||||
|
||||
public kotlinx.serialization.SerialDescriptor getDescriptor()
|
||||
|
||||
public OptionalUser patch(kotlinx.serialization.Decoder decoder, OptionalUser old)
|
||||
|
||||
public java.lang.Object patch(kotlinx.serialization.Decoder p0, java.lang.Object p1)
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder encoder, OptionalUser obj) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (encoder)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (2)
|
||||
LDC (obj)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
GETSTATIC ($$serialDesc, Lkotlinx/serialization/SerialDescriptor;)
|
||||
ASTORE (3)
|
||||
ALOAD (1)
|
||||
ALOAD (3)
|
||||
ICONST_0
|
||||
ANEWARRAY
|
||||
INVOKEINTERFACE (kotlinx/serialization/Encoder, beginStructure, (Lkotlinx/serialization/SerialDescriptor;[Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/CompositeEncoder;)
|
||||
ASTORE (1)
|
||||
ALOAD (2)
|
||||
ALOAD (1)
|
||||
ALOAD (3)
|
||||
INVOKESTATIC (OptionalUser, write$Self, (LOptionalUser;Lkotlinx/serialization/CompositeEncoder;Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
ALOAD (1)
|
||||
ALOAD (3)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder p0, java.lang.Object p1) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (10)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
CHECKCAST
|
||||
INVOKEVIRTUAL (OptionalUser$$serializer, serialize, (Lkotlinx/serialization/Encoder;LOptionalUser;)V)
|
||||
RETURN
|
||||
}
|
||||
}
|
||||
|
||||
public final class OptionalUser$Companion : java/lang/Object {
|
||||
private void <init>() {
|
||||
LABEL (L0)
|
||||
LINENUMBER (10)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public void <init>(kotlin.jvm.internal.DefaultConstructorMarker $constructor_marker) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (10)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (OptionalUser$Companion, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public final kotlinx.serialization.KSerializer serializer()
|
||||
}
|
||||
|
||||
public final class OptionalUser : java/lang/Object {
|
||||
public final static OptionalUser$Companion Companion
|
||||
|
||||
private final User user
|
||||
|
||||
static void <clinit>() {
|
||||
NEW
|
||||
DUP
|
||||
ACONST_NULL
|
||||
INVOKESPECIAL (OptionalUser$Companion, <init>, (Lkotlin/jvm/internal/DefaultConstructorMarker;)V)
|
||||
PUTSTATIC (Companion, LOptionalUser$Companion;)
|
||||
RETURN
|
||||
}
|
||||
|
||||
public void <init>(User user) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (user)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
LABEL (L1)
|
||||
LINENUMBER (10)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
PUTFIELD (user, LUser;)
|
||||
RETURN
|
||||
LABEL (L2)
|
||||
}
|
||||
|
||||
public void <init>(User p0, int p1, kotlin.jvm.internal.DefaultConstructorMarker p2) {
|
||||
ILOAD (2)
|
||||
ICONST_1
|
||||
IAND
|
||||
IFEQ (L0)
|
||||
LABEL (L1)
|
||||
LINENUMBER (10)
|
||||
NEW
|
||||
DUP
|
||||
LDC ()
|
||||
LDC ()
|
||||
INVOKESPECIAL (User, <init>, (Ljava/lang/String;Ljava/lang/String;)V)
|
||||
ASTORE (1)
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
INVOKESPECIAL (OptionalUser, <init>, (LUser;)V)
|
||||
RETURN
|
||||
}
|
||||
|
||||
public void <init>() {
|
||||
ALOAD (0)
|
||||
ACONST_NULL
|
||||
ICONST_1
|
||||
ACONST_NULL
|
||||
INVOKESPECIAL (OptionalUser, <init>, (LUser;ILkotlin/jvm/internal/DefaultConstructorMarker;)V)
|
||||
RETURN
|
||||
}
|
||||
|
||||
public void <init>(int seen1, User user, kotlinx.serialization.SerializationConstructorMarker serializationConstructorMarker) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
ILOAD (1)
|
||||
ICONST_1
|
||||
IAND
|
||||
IFEQ (L1)
|
||||
ALOAD (0)
|
||||
ALOAD (2)
|
||||
PUTFIELD (user, LUser;)
|
||||
GOTO (L2)
|
||||
LABEL (L1)
|
||||
ALOAD (0)
|
||||
LABEL (L3)
|
||||
LINENUMBER (10)
|
||||
NEW
|
||||
DUP
|
||||
LDC ()
|
||||
LDC ()
|
||||
INVOKESPECIAL (User, <init>, (Ljava/lang/String;Ljava/lang/String;)V)
|
||||
PUTFIELD (user, LUser;)
|
||||
LABEL (L2)
|
||||
RETURN
|
||||
LABEL (L4)
|
||||
}
|
||||
|
||||
public final User getUser()
|
||||
|
||||
public final static void write$Self(OptionalUser self, kotlinx.serialization.CompositeEncoder output, kotlinx.serialization.SerialDescriptor serialDesc) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
LDC (self)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (1)
|
||||
LDC (output)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (2)
|
||||
LDC (serialDesc)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (0)
|
||||
GETFIELD (user, LUser;)
|
||||
LABEL (L1)
|
||||
LINENUMBER (10)
|
||||
NEW
|
||||
DUP
|
||||
LDC ()
|
||||
LDC ()
|
||||
INVOKESPECIAL (User, <init>, (Ljava/lang/String;Ljava/lang/String;)V)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, areEqual, (Ljava/lang/Object;Ljava/lang/Object;)Z)
|
||||
ICONST_1
|
||||
IXOR
|
||||
IFNE (L2)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, shouldEncodeElementDefault, (Lkotlinx/serialization/SerialDescriptor;I)Z)
|
||||
IFEQ (L3)
|
||||
LABEL (L2)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
ALOAD (0)
|
||||
GETFIELD (user, LUser;)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, encodeSerializableElement, (Lkotlinx/serialization/SerialDescriptor;ILkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;)V)
|
||||
LABEL (L3)
|
||||
RETURN
|
||||
LABEL (L4)
|
||||
}
|
||||
}
|
||||
|
||||
public final class User$$serializer : java/lang/Object, kotlinx/serialization/internal/GeneratedSerializer {
|
||||
private final static kotlinx.serialization.SerialDescriptor $$serialDesc
|
||||
|
||||
public final static User$$serializer INSTANCE
|
||||
|
||||
static void <clinit>() {
|
||||
LABEL (L0)
|
||||
LINENUMBER (7)
|
||||
NEW
|
||||
DUP
|
||||
INVOKESPECIAL (User$$serializer, <init>, ()V)
|
||||
ASTORE (0)
|
||||
ALOAD (0)
|
||||
PUTSTATIC (INSTANCE, LUser$$serializer;)
|
||||
NEW
|
||||
DUP
|
||||
LDC (User)
|
||||
GETSTATIC (INSTANCE, LUser$$serializer;)
|
||||
CHECKCAST
|
||||
INVOKESPECIAL (kotlinx/serialization/internal/SerialClassDescImpl, <init>, (Ljava/lang/String;Lkotlinx/serialization/internal/GeneratedSerializer;)V)
|
||||
ASTORE (0)
|
||||
ALOAD (0)
|
||||
LDC (firstName)
|
||||
ICONST_0
|
||||
INVOKEVIRTUAL (kotlinx/serialization/internal/SerialClassDescImpl, addElement, (Ljava/lang/String;Z)V)
|
||||
ALOAD (0)
|
||||
LDC (lastName)
|
||||
ICONST_0
|
||||
INVOKEVIRTUAL (kotlinx/serialization/internal/SerialClassDescImpl, addElement, (Ljava/lang/String;Z)V)
|
||||
ALOAD (0)
|
||||
PUTSTATIC ($$serialDesc, Lkotlinx/serialization/SerialDescriptor;)
|
||||
RETURN
|
||||
}
|
||||
|
||||
private void <init>() {
|
||||
LABEL (L0)
|
||||
LINENUMBER (7)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public kotlinx.serialization.KSerializer[] childSerializers() {
|
||||
LABEL (L0)
|
||||
ICONST_2
|
||||
ANEWARRAY
|
||||
DUP
|
||||
ICONST_0
|
||||
GETSTATIC (INSTANCE, Lkotlinx/serialization/internal/StringSerializer;)
|
||||
CHECKCAST
|
||||
AASTORE
|
||||
DUP
|
||||
ICONST_1
|
||||
GETSTATIC (INSTANCE, Lkotlinx/serialization/internal/StringSerializer;)
|
||||
CHECKCAST
|
||||
AASTORE
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public User deserialize(kotlinx.serialization.Decoder decoder) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (decoder)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
GETSTATIC ($$serialDesc, Lkotlinx/serialization/SerialDescriptor;)
|
||||
ASTORE (2)
|
||||
ICONST_0
|
||||
ISTORE (4)
|
||||
ICONST_0
|
||||
ISTORE (5)
|
||||
ACONST_NULL
|
||||
ASTORE (6)
|
||||
ACONST_NULL
|
||||
ASTORE (7)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
ANEWARRAY
|
||||
INVOKEINTERFACE (kotlinx/serialization/Decoder, beginStructure, (Lkotlinx/serialization/SerialDescriptor;[Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/CompositeDecoder;)
|
||||
ASTORE (1)
|
||||
LABEL (L1)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeElementIndex, (Lkotlinx/serialization/SerialDescriptor;)I)
|
||||
ISTORE (3)
|
||||
ILOAD (3)
|
||||
TABLESWITCH
|
||||
LABEL (L2)
|
||||
ICONST_1
|
||||
ISTORE (4)
|
||||
LABEL (L3)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeStringElement, (Lkotlinx/serialization/SerialDescriptor;I)Ljava/lang/String;)
|
||||
ASTORE (6)
|
||||
ILOAD (5)
|
||||
ICONST_1
|
||||
IOR
|
||||
ISTORE (5)
|
||||
ILOAD (4)
|
||||
IFEQ (L1)
|
||||
LABEL (L4)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_1
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, decodeStringElement, (Lkotlinx/serialization/SerialDescriptor;I)Ljava/lang/String;)
|
||||
ASTORE (7)
|
||||
ILOAD (5)
|
||||
ICONST_2
|
||||
IOR
|
||||
ISTORE (5)
|
||||
ILOAD (4)
|
||||
IFEQ (L1)
|
||||
LABEL (L5)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeDecoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
NEW
|
||||
DUP
|
||||
ILOAD (5)
|
||||
ALOAD (6)
|
||||
ALOAD (7)
|
||||
ACONST_NULL
|
||||
INVOKESPECIAL (User, <init>, (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/SerializationConstructorMarker;)V)
|
||||
ARETURN
|
||||
LABEL (L6)
|
||||
NEW
|
||||
DUP
|
||||
ILOAD (3)
|
||||
INVOKESPECIAL (kotlinx/serialization/UnknownFieldException, <init>, (I)V)
|
||||
CHECKCAST
|
||||
ATHROW
|
||||
LABEL (L7)
|
||||
}
|
||||
|
||||
public java.lang.Object deserialize(kotlinx.serialization.Decoder p0) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (7)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
INVOKEVIRTUAL (User$$serializer, deserialize, (Lkotlinx/serialization/Decoder;)LUser;)
|
||||
ARETURN
|
||||
}
|
||||
|
||||
public kotlinx.serialization.SerialDescriptor getDescriptor()
|
||||
|
||||
public User patch(kotlinx.serialization.Decoder decoder, User old)
|
||||
|
||||
public java.lang.Object patch(kotlinx.serialization.Decoder p0, java.lang.Object p1)
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder encoder, User obj) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (encoder)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (2)
|
||||
LDC (obj)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
GETSTATIC ($$serialDesc, Lkotlinx/serialization/SerialDescriptor;)
|
||||
ASTORE (3)
|
||||
ALOAD (1)
|
||||
ALOAD (3)
|
||||
ICONST_0
|
||||
ANEWARRAY
|
||||
INVOKEINTERFACE (kotlinx/serialization/Encoder, beginStructure, (Lkotlinx/serialization/SerialDescriptor;[Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/CompositeEncoder;)
|
||||
ASTORE (1)
|
||||
ALOAD (2)
|
||||
ALOAD (1)
|
||||
ALOAD (3)
|
||||
INVOKESTATIC (User, write$Self, (LUser;Lkotlinx/serialization/CompositeEncoder;Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
ALOAD (1)
|
||||
ALOAD (3)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder p0, java.lang.Object p1) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (7)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
CHECKCAST
|
||||
INVOKEVIRTUAL (User$$serializer, serialize, (Lkotlinx/serialization/Encoder;LUser;)V)
|
||||
RETURN
|
||||
}
|
||||
}
|
||||
|
||||
public final class User$Companion : java/lang/Object {
|
||||
private void <init>() {
|
||||
LABEL (L0)
|
||||
LINENUMBER (7)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public void <init>(kotlin.jvm.internal.DefaultConstructorMarker $constructor_marker) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (7)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (User$Companion, <init>, ()V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public final kotlinx.serialization.KSerializer serializer()
|
||||
}
|
||||
|
||||
public final class User : java/lang/Object {
|
||||
public final static User$Companion Companion
|
||||
|
||||
private final java.lang.String firstName
|
||||
|
||||
private final java.lang.String lastName
|
||||
|
||||
static void <clinit>() {
|
||||
NEW
|
||||
DUP
|
||||
ACONST_NULL
|
||||
INVOKESPECIAL (User$Companion, <init>, (Lkotlin/jvm/internal/DefaultConstructorMarker;)V)
|
||||
PUTSTATIC (Companion, LUser$Companion;)
|
||||
RETURN
|
||||
}
|
||||
|
||||
public void <init>(java.lang.String firstName, java.lang.String lastName) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (firstName)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (2)
|
||||
LDC (lastName)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
LABEL (L1)
|
||||
LINENUMBER (7)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
PUTFIELD (firstName, Ljava/lang/String;)
|
||||
ALOAD (0)
|
||||
ALOAD (2)
|
||||
PUTFIELD (lastName, Ljava/lang/String;)
|
||||
RETURN
|
||||
LABEL (L2)
|
||||
}
|
||||
|
||||
public void <init>(int seen1, java.lang.String firstName, java.lang.String lastName, kotlinx.serialization.SerializationConstructorMarker serializationConstructorMarker) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
INVOKESPECIAL (java/lang/Object, <init>, ()V)
|
||||
ILOAD (1)
|
||||
ICONST_1
|
||||
IAND
|
||||
IFNE (L1)
|
||||
NEW
|
||||
DUP
|
||||
LDC (firstName)
|
||||
INVOKESPECIAL (kotlinx/serialization/MissingFieldException, <init>, (Ljava/lang/String;)V)
|
||||
CHECKCAST
|
||||
ATHROW
|
||||
LABEL (L1)
|
||||
ALOAD (0)
|
||||
ALOAD (2)
|
||||
PUTFIELD (firstName, Ljava/lang/String;)
|
||||
ILOAD (1)
|
||||
ICONST_2
|
||||
IAND
|
||||
IFNE (L2)
|
||||
NEW
|
||||
DUP
|
||||
LDC (lastName)
|
||||
INVOKESPECIAL (kotlinx/serialization/MissingFieldException, <init>, (Ljava/lang/String;)V)
|
||||
CHECKCAST
|
||||
ATHROW
|
||||
LABEL (L2)
|
||||
ALOAD (0)
|
||||
ALOAD (3)
|
||||
PUTFIELD (lastName, Ljava/lang/String;)
|
||||
RETURN
|
||||
LABEL (L3)
|
||||
}
|
||||
|
||||
public final java.lang.String getFirstName()
|
||||
|
||||
public final java.lang.String getLastName()
|
||||
|
||||
public final static void write$Self(User self, kotlinx.serialization.CompositeEncoder output, kotlinx.serialization.SerialDescriptor serialDesc) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
LDC (self)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (1)
|
||||
LDC (output)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (2)
|
||||
LDC (serialDesc)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_0
|
||||
ALOAD (0)
|
||||
GETFIELD (firstName, Ljava/lang/String;)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, encodeStringElement, (Lkotlinx/serialization/SerialDescriptor;ILjava/lang/String;)V)
|
||||
ALOAD (1)
|
||||
ALOAD (2)
|
||||
ICONST_1
|
||||
ALOAD (0)
|
||||
GETFIELD (lastName, Ljava/lang/String;)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, encodeStringElement, (Lkotlinx/serialization/SerialDescriptor;ILjava/lang/String;)V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
|
||||
|
||||
// FILE: test.kt
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
open class Parent(open val arg: Int)
|
||||
|
||||
<!PLUGIN_ERROR("Serializable class has duplicate serial name of property 'arg', either in the class itself or its supertypes")!>@Serializable<!>
|
||||
class Derived(override val arg: Int): Parent(arg)
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package
|
||||
|
||||
@kotlinx.serialization.Serializable public final class Derived : Parent {
|
||||
public constructor Derived(/*0*/ arg: kotlin.Int)
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public /*synthesized*/ constructor Derived(/*0*/ seen1: kotlin.Int, /*1*/ arg: kotlin.Int, /*2*/ arg: kotlin.Int, /*3*/ serializationConstructorMarker: kotlinx.serialization.SerializationConstructorMarker?)
|
||||
public open override /*1*/ val arg: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public object `$serializer` : kotlinx.serialization.internal.GeneratedSerializer<Derived> {
|
||||
private constructor `$serializer`()
|
||||
public open override /*1*/ /*synthesized*/ val descriptor: kotlinx.serialization.SerialDescriptor
|
||||
public open override /*1*/ /*synthesized*/ fun childSerializers(): kotlin.Array<kotlinx.serialization.KSerializer<*>>
|
||||
public open override /*1*/ /*synthesized*/ fun deserialize(/*0*/ decoder: kotlinx.serialization.Decoder): Derived
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun patch(/*0*/ decoder: kotlinx.serialization.Decoder, /*1*/ old: Derived): Derived
|
||||
public open override /*1*/ /*synthesized*/ fun serialize(/*0*/ encoder: kotlinx.serialization.Encoder, /*1*/ obj: Derived): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final /*synthesized*/ fun serializer(): kotlinx.serialization.KSerializer<Derived>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
@kotlinx.serialization.Serializable public open class Parent {
|
||||
public constructor Parent(/*0*/ arg: kotlin.Int)
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public /*synthesized*/ constructor Parent(/*0*/ seen1: kotlin.Int, /*1*/ arg: kotlin.Int, /*2*/ serializationConstructorMarker: kotlinx.serialization.SerializationConstructorMarker?)
|
||||
public open val arg: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public object `$serializer` : kotlinx.serialization.internal.GeneratedSerializer<Parent> {
|
||||
private constructor `$serializer`()
|
||||
public open override /*1*/ /*synthesized*/ val descriptor: kotlinx.serialization.SerialDescriptor
|
||||
public open override /*1*/ /*synthesized*/ fun childSerializers(): kotlin.Array<kotlinx.serialization.KSerializer<*>>
|
||||
public open override /*1*/ /*synthesized*/ fun deserialize(/*0*/ decoder: kotlinx.serialization.Decoder): Parent
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun patch(/*0*/ decoder: kotlinx.serialization.Decoder, /*1*/ old: Parent): Parent
|
||||
public open override /*1*/ /*synthesized*/ fun serialize(/*0*/ encoder: kotlinx.serialization.Encoder, /*1*/ obj: Parent): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final /*synthesized*/ fun serializer(): kotlinx.serialization.KSerializer<Parent>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
|
||||
|
||||
// FILE: test.kt
|
||||
import kotlinx.serialization.*
|
||||
|
||||
open class NonSerializableParent(val arg: Int)
|
||||
|
||||
<!PLUGIN_ERROR("Impossible to make this class serializable because its parent is not serializable and does not have exactly one constructor without parameters")!>@Serializable<!>
|
||||
class Derived(val someData: String): NonSerializableParent(42)
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package
|
||||
|
||||
@kotlinx.serialization.Serializable public final class Derived : NonSerializableParent {
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public /*synthesized*/ constructor Derived(/*0*/ seen1: kotlin.Int, /*1*/ someData: kotlin.String?, /*2*/ serializationConstructorMarker: kotlinx.serialization.SerializationConstructorMarker?)
|
||||
public constructor Derived(/*0*/ someData: kotlin.String)
|
||||
public final override /*1*/ /*fake_override*/ val arg: kotlin.Int
|
||||
public final val someData: kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public object `$serializer` : kotlinx.serialization.internal.GeneratedSerializer<Derived> {
|
||||
private constructor `$serializer`()
|
||||
public open override /*1*/ /*synthesized*/ val descriptor: kotlinx.serialization.SerialDescriptor
|
||||
public open override /*1*/ /*synthesized*/ fun childSerializers(): kotlin.Array<kotlinx.serialization.KSerializer<*>>
|
||||
public open override /*1*/ /*synthesized*/ fun deserialize(/*0*/ decoder: kotlinx.serialization.Decoder): Derived
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun patch(/*0*/ decoder: kotlinx.serialization.Decoder, /*1*/ old: Derived): Derived
|
||||
public open override /*1*/ /*synthesized*/ fun serialize(/*0*/ encoder: kotlinx.serialization.Encoder, /*1*/ obj: Derived): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final /*synthesized*/ fun serializer(): kotlinx.serialization.KSerializer<Derived>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public open class NonSerializableParent {
|
||||
public constructor NonSerializableParent(/*0*/ arg: kotlin.Int)
|
||||
public final val arg: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
|
||||
|
||||
// FILE: test.kt
|
||||
import kotlinx.serialization.*
|
||||
|
||||
class NonSerializable
|
||||
|
||||
@Serializable
|
||||
class Basic(val foo: <!PLUGIN_ERROR("Serializer has not been found for type 'NonSerializable'. To use context serializer as fallback, explicitly annotate type or property with @ContextualSerialization")!>NonSerializable<!>)
|
||||
|
||||
@Serializable
|
||||
class Inside(val foo: List<<!PLUGIN_ERROR("Serializer has not been found for type 'NonSerializable'. To use context serializer as fallback, explicitly annotate type or property with @ContextualSerialization")!>NonSerializable<!>>)
|
||||
|
||||
@Serializable
|
||||
class WithImplicitType {
|
||||
<!PLUGIN_ERROR("Serializer has not been found for type 'NonSerializable'. To use context serializer as fallback, explicitly annotate type or property with @ContextualSerialization")!>val foo = NonSerializable()<!>
|
||||
}
|
||||
Vendored
+95
@@ -0,0 +1,95 @@
|
||||
package
|
||||
|
||||
@kotlinx.serialization.Serializable public final class Basic {
|
||||
public constructor Basic(/*0*/ foo: NonSerializable)
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public /*synthesized*/ constructor Basic(/*0*/ seen1: kotlin.Int, /*1*/ foo: NonSerializable?, /*2*/ serializationConstructorMarker: kotlinx.serialization.SerializationConstructorMarker?)
|
||||
public final val foo: NonSerializable
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public object `$serializer` : kotlinx.serialization.internal.GeneratedSerializer<Basic> {
|
||||
private constructor `$serializer`()
|
||||
public open override /*1*/ /*synthesized*/ val descriptor: kotlinx.serialization.SerialDescriptor
|
||||
public open override /*1*/ /*synthesized*/ fun childSerializers(): kotlin.Array<kotlinx.serialization.KSerializer<*>>
|
||||
public open override /*1*/ /*synthesized*/ fun deserialize(/*0*/ decoder: kotlinx.serialization.Decoder): Basic
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun patch(/*0*/ decoder: kotlinx.serialization.Decoder, /*1*/ old: Basic): Basic
|
||||
public open override /*1*/ /*synthesized*/ fun serialize(/*0*/ encoder: kotlinx.serialization.Encoder, /*1*/ obj: Basic): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final /*synthesized*/ fun serializer(): kotlinx.serialization.KSerializer<Basic>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
@kotlinx.serialization.Serializable public final class Inside {
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public /*synthesized*/ constructor Inside(/*0*/ seen1: kotlin.Int, /*1*/ foo: kotlin.collections.List<NonSerializable>?, /*2*/ serializationConstructorMarker: kotlinx.serialization.SerializationConstructorMarker?)
|
||||
public constructor Inside(/*0*/ foo: kotlin.collections.List<NonSerializable>)
|
||||
public final val foo: kotlin.collections.List<NonSerializable>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public object `$serializer` : kotlinx.serialization.internal.GeneratedSerializer<Inside> {
|
||||
private constructor `$serializer`()
|
||||
public open override /*1*/ /*synthesized*/ val descriptor: kotlinx.serialization.SerialDescriptor
|
||||
public open override /*1*/ /*synthesized*/ fun childSerializers(): kotlin.Array<kotlinx.serialization.KSerializer<*>>
|
||||
public open override /*1*/ /*synthesized*/ fun deserialize(/*0*/ decoder: kotlinx.serialization.Decoder): Inside
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun patch(/*0*/ decoder: kotlinx.serialization.Decoder, /*1*/ old: Inside): Inside
|
||||
public open override /*1*/ /*synthesized*/ fun serialize(/*0*/ encoder: kotlinx.serialization.Encoder, /*1*/ obj: Inside): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final /*synthesized*/ fun serializer(): kotlinx.serialization.KSerializer<Inside>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final class NonSerializable {
|
||||
public constructor NonSerializable()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlinx.serialization.Serializable public final class WithImplicitType {
|
||||
public constructor WithImplicitType()
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public /*synthesized*/ constructor WithImplicitType(/*0*/ seen1: kotlin.Int, /*1*/ foo: NonSerializable?, /*2*/ serializationConstructorMarker: kotlinx.serialization.SerializationConstructorMarker?)
|
||||
public final val foo: NonSerializable
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public object `$serializer` : kotlinx.serialization.internal.GeneratedSerializer<WithImplicitType> {
|
||||
private constructor `$serializer`()
|
||||
public open override /*1*/ /*synthesized*/ val descriptor: kotlinx.serialization.SerialDescriptor
|
||||
public open override /*1*/ /*synthesized*/ fun childSerializers(): kotlin.Array<kotlinx.serialization.KSerializer<*>>
|
||||
public open override /*1*/ /*synthesized*/ fun deserialize(/*0*/ decoder: kotlinx.serialization.Decoder): WithImplicitType
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun patch(/*0*/ decoder: kotlinx.serialization.Decoder, /*1*/ old: WithImplicitType): WithImplicitType
|
||||
public open override /*1*/ /*synthesized*/ fun serialize(/*0*/ encoder: kotlinx.serialization.Encoder, /*1*/ obj: WithImplicitType): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final /*synthesized*/ fun serializer(): kotlinx.serialization.KSerializer<WithImplicitType>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
|
||||
|
||||
// FILE: test.kt
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable(NopeNullableSerializer::class)
|
||||
class Nope {}
|
||||
|
||||
class NopeNullableSerializer: KSerializer<Nope?> {
|
||||
override val descriptor: SerialDescriptor get() = TODO()
|
||||
override fun deserialize(decoder: Decoder): Nope? = TODO()
|
||||
override fun serialize(encoder: Encoder, obj: Nope?) = TODO()
|
||||
}
|
||||
|
||||
@Serializable
|
||||
class Foo(val foo: <!PLUGIN_ERROR("Type 'Nope' is non-nullable and therefore can not be serialized with serializer for nullable type 'NopeNullableSerializer'")!>Nope<!>)
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package
|
||||
|
||||
@kotlinx.serialization.Serializable public final class Foo {
|
||||
public constructor Foo(/*0*/ foo: Nope)
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public /*synthesized*/ constructor Foo(/*0*/ seen1: kotlin.Int, /*1*/ foo: Nope?, /*2*/ serializationConstructorMarker: kotlinx.serialization.SerializationConstructorMarker?)
|
||||
public final val foo: Nope
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public object `$serializer` : kotlinx.serialization.internal.GeneratedSerializer<Foo> {
|
||||
private constructor `$serializer`()
|
||||
public open override /*1*/ /*synthesized*/ val descriptor: kotlinx.serialization.SerialDescriptor
|
||||
public open override /*1*/ /*synthesized*/ fun childSerializers(): kotlin.Array<kotlinx.serialization.KSerializer<*>>
|
||||
public open override /*1*/ /*synthesized*/ fun deserialize(/*0*/ decoder: kotlinx.serialization.Decoder): Foo
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun patch(/*0*/ decoder: kotlinx.serialization.Decoder, /*1*/ old: Foo): Foo
|
||||
public open override /*1*/ /*synthesized*/ fun serialize(/*0*/ encoder: kotlinx.serialization.Encoder, /*1*/ obj: Foo): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final /*synthesized*/ fun serializer(): kotlinx.serialization.KSerializer<Foo>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
@kotlinx.serialization.Serializable(with = NopeNullableSerializer::class) public final class Nope {
|
||||
public constructor Nope()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final /*synthesized*/ fun serializer(): kotlinx.serialization.KSerializer<Nope>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final class NopeNullableSerializer : kotlinx.serialization.KSerializer<Nope?> {
|
||||
public constructor NopeNullableSerializer()
|
||||
public open override /*1*/ val descriptor: kotlinx.serialization.SerialDescriptor
|
||||
public open override /*1*/ fun deserialize(/*0*/ decoder: kotlinx.serialization.Decoder): Nope?
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun patch(/*0*/ decoder: kotlinx.serialization.Decoder, /*1*/ old: Nope?): Nope?
|
||||
public open override /*1*/ fun serialize(/*0*/ encoder: kotlinx.serialization.Encoder, /*1*/ obj: Nope?): kotlin.Nothing
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
|
||||
|
||||
// FILE: test.kt
|
||||
import kotlinx.serialization.*
|
||||
|
||||
<!PLUGIN_ERROR("This class is not serializable automatically because it has primary constructor parameters of which are not properties")!>@Serializable<!>
|
||||
class Test(val someData: String, cantBeDeserialized: Int)
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package
|
||||
|
||||
@kotlinx.serialization.Serializable public final class Test {
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public /*synthesized*/ constructor Test(/*0*/ seen1: kotlin.Int, /*1*/ someData: kotlin.String?, /*2*/ serializationConstructorMarker: kotlinx.serialization.SerializationConstructorMarker?)
|
||||
public constructor Test(/*0*/ someData: kotlin.String, /*1*/ cantBeDeserialized: kotlin.Int)
|
||||
public final val someData: kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public object `$serializer` : kotlinx.serialization.internal.GeneratedSerializer<Test> {
|
||||
private constructor `$serializer`()
|
||||
public open override /*1*/ /*synthesized*/ val descriptor: kotlinx.serialization.SerialDescriptor
|
||||
public open override /*1*/ /*synthesized*/ fun childSerializers(): kotlin.Array<kotlinx.serialization.KSerializer<*>>
|
||||
public open override /*1*/ /*synthesized*/ fun deserialize(/*0*/ decoder: kotlinx.serialization.Decoder): Test
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun patch(/*0*/ decoder: kotlinx.serialization.Decoder, /*1*/ old: Test): Test
|
||||
public open override /*1*/ /*synthesized*/ fun serialize(/*0*/ encoder: kotlinx.serialization.Encoder, /*1*/ obj: Test): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final /*synthesized*/ fun serializer(): kotlinx.serialization.KSerializer<Test>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
|
||||
|
||||
// FILE: test.kt
|
||||
import kotlinx.serialization.*
|
||||
|
||||
<!PLUGIN_ERROR("@Serializable annotation is ignored because it is impossible to serialize automatically interfaces or enums. Provide serializer manually via e.g. companion object")!>@Serializable<!>
|
||||
interface INonSerializable
|
||||
|
||||
<!PLUGIN_ERROR("@Serializable annotation is ignored because it is impossible to serialize automatically interfaces or enums. Provide serializer manually via e.g. companion object")!>@Serializable<!>
|
||||
enum class ENonSerializable { A, B }
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package
|
||||
|
||||
@kotlinx.serialization.Serializable public final enum class ENonSerializable : kotlin.Enum<ENonSerializable> {
|
||||
enum entry A
|
||||
|
||||
enum entry B
|
||||
|
||||
private constructor ENonSerializable()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: ENonSerializable): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<ENonSerializable!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): ENonSerializable
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<ENonSerializable>
|
||||
}
|
||||
|
||||
@kotlinx.serialization.Serializable public interface INonSerializable {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
|
||||
|
||||
// FILE: test.kt
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
data class WithTransients(<!PLUGIN_ERROR("This property is marked as @Transient and therefore must have an initializing expression")!>@Transient val missing: Int<!>) {
|
||||
<!PLUGIN_WARNING("Property does not have backing field which makes it non-serializable and therefore @Transient is redundant")!>@Transient<!> val redundant: Int get() = 42
|
||||
}
|
||||
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
package
|
||||
|
||||
@kotlinx.serialization.Serializable public final data class WithTransients {
|
||||
public constructor WithTransients(/*0*/ missing: kotlin.Int)
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public /*synthesized*/ constructor WithTransients(/*0*/ seen1: kotlin.Int, /*1*/ serializationConstructorMarker: kotlinx.serialization.SerializationConstructorMarker?)
|
||||
@kotlinx.serialization.Transient public final val missing: kotlin.Int
|
||||
@kotlinx.serialization.Transient public final val redundant: kotlin.Int
|
||||
public final operator /*synthesized*/ fun component1(): kotlin.Int
|
||||
public final /*synthesized*/ fun copy(/*0*/ missing: kotlin.Int = ...): WithTransients
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = kotlin.ReplaceWith(expression = "", imports = {})) public object `$serializer` : kotlinx.serialization.internal.GeneratedSerializer<WithTransients> {
|
||||
private constructor `$serializer`()
|
||||
public open override /*1*/ /*synthesized*/ val descriptor: kotlinx.serialization.SerialDescriptor
|
||||
public open override /*1*/ /*synthesized*/ fun childSerializers(): kotlin.Array<kotlinx.serialization.KSerializer<*>>
|
||||
public open override /*1*/ /*synthesized*/ fun deserialize(/*0*/ decoder: kotlinx.serialization.Decoder): WithTransients
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun patch(/*0*/ decoder: kotlinx.serialization.Decoder, /*1*/ old: WithTransients): WithTransients
|
||||
public open override /*1*/ /*synthesized*/ fun serialize(/*0*/ encoder: kotlinx.serialization.Encoder, /*1*/ obj: WithTransients): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final /*synthesized*/ fun serializer(): kotlinx.serialization.KSerializer<WithTransients>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user