JVM, JVM_IR: no nullability annotations on private and synthetic methods

NB it looks like it doesn't cover all cases, e.g., some synthetic
methods generated for suspend functions.
This commit is contained in:
Dmitry Petrov
2020-06-26 12:06:24 +03:00
parent 5684e694b5
commit 2137a4b1e5
31 changed files with 163 additions and 156 deletions
@@ -628,7 +628,16 @@ public abstract class AnnotationCodegen {
@NotNull InnerClassConsumer innerClassConsumer,
@NotNull GenerationState state
) {
return new AnnotationCodegen(innerClassConsumer, state) {
return forMethod(mv, innerClassConsumer, state, false);
}
public static AnnotationCodegen forMethod(
@NotNull MethodVisitor mv,
@NotNull InnerClassConsumer innerClassConsumer,
@NotNull GenerationState state,
boolean skipNullabilityAnnotations
) {
return new AnnotationCodegen(innerClassConsumer, state, skipNullabilityAnnotations) {
@NotNull
@Override
AnnotationVisitor visitAnnotation(String descr, boolean visible) {
@@ -676,9 +685,10 @@ public abstract class AnnotationCodegen {
int parameter,
@NotNull MethodVisitor mv,
@NotNull InnerClassConsumer innerClassConsumer,
@NotNull GenerationState state
@NotNull GenerationState state,
boolean skipNullabilityAnnotations
) {
return new AnnotationCodegen(innerClassConsumer, state) {
return new AnnotationCodegen(innerClassConsumer, state, skipNullabilityAnnotations) {
@NotNull
@Override
AnnotationVisitor visitAnnotation(String descr, boolean visible) {
@@ -153,18 +153,18 @@ class DefaultParameterValueSubstitutor(val state: GenerationState) {
signature.genericsSignature,
FunctionCodegen.getThrownExceptions(functionDescriptor, typeMapper)
)
val skipNullabilityAnnotations = flags and Opcodes.ACC_PRIVATE != 0 || flags and Opcodes.ACC_SYNTHETIC != 0
AnnotationCodegen.forMethod(mv, memberCodegen, state).genAnnotations(
functionDescriptor,
signature.returnType,
functionDescriptor.returnType
)
AnnotationCodegen.forMethod(mv, memberCodegen, state, skipNullabilityAnnotations)
.genAnnotations(functionDescriptor, signature.returnType, functionDescriptor.returnType)
if (state.classBuilderMode == ClassBuilderMode.KAPT3) {
mv.visitAnnotation(ANNOTATION_TYPE_DESCRIPTOR_FOR_JVM_OVERLOADS_GENERATED_METHODS, false)
}
FunctionCodegen.generateParameterAnnotations(functionDescriptor, mv, signature, remainingParameters, memberCodegen, state)
FunctionCodegen.generateParameterAnnotations(
functionDescriptor, mv, signature, remainingParameters, memberCodegen, state, skipNullabilityAnnotations
)
if (!state.classBuilderMode.generateBodies) {
FunctionCodegen.generateLocalVariablesForParameters(
@@ -205,12 +205,13 @@ public class FunctionCodegen {
MethodVisitor mv =
strategy.wrapMethodVisitor(
newMethod(origin,
flags,
asmMethod.getName(),
asmMethod.getDescriptor(),
strategy.skipGenericSignature() ? null : jvmSignature.getGenericsSignature(),
getThrownExceptions(functionDescriptor, typeMapper)
newMethod(
origin,
flags,
asmMethod.getName(),
asmMethod.getDescriptor(),
strategy.skipGenericSignature() ? null : jvmSignature.getGenericsSignature(),
getThrownExceptions(functionDescriptor, typeMapper)
),
flags, asmMethod.getName(),
asmMethod.getDescriptor()
@@ -218,10 +219,12 @@ public class FunctionCodegen {
recordMethodForFunctionIfAppropriate(functionDescriptor, asmMethod);
generateMethodAnnotationsIfRequired(functionDescriptor, asmMethod, jvmSignature, mv, isCompatibilityStubInDefaultImpls
? Collections.singletonList(Deprecated.class)
: Collections.emptyList());
boolean skipNullabilityAnnotations = (flags & ACC_PRIVATE) != 0 || (flags & ACC_SYNTHETIC) != 0;
generateMethodAnnotationsIfRequired(
functionDescriptor, asmMethod, jvmSignature, mv,
isCompatibilityStubInDefaultImpls ? Collections.singletonList(Deprecated.class) : Collections.emptyList(),
skipNullabilityAnnotations
);
GenerateJava8ParameterNamesKt.generateParameterNames(functionDescriptor, mv, jvmSignature, state, (flags & ACC_SYNTHETIC) != 0);
if (contextKind != OwnerKind.ERASED_INLINE_CLASS) {
@@ -283,7 +286,8 @@ public class FunctionCodegen {
@NotNull Method asmMethod,
@NotNull JvmMethodGenericSignature jvmSignature,
@NotNull MethodVisitor mv,
@NotNull List<Class<?>> additionalNoArgAnnotations
@NotNull List<Class<?>> additionalNoArgAnnotations,
boolean skipNullabilityAnnotations
) {
FunctionDescriptor annotationsOwner;
if (shouldHideConstructorDueToInlineClassTypeValueParameters(functionDescriptor)) {
@@ -298,10 +302,14 @@ public class FunctionCodegen {
annotationsOwner = functionDescriptor;
}
AnnotationCodegen.forMethod(mv, memberCodegen, state)
AnnotationCodegen.forMethod(mv, memberCodegen, state, skipNullabilityAnnotations)
.genAnnotations(annotationsOwner, asmMethod.getReturnType(), functionDescriptor.getReturnType(), null, additionalNoArgAnnotations);
generateParameterAnnotations(annotationsOwner, mv, jvmSignature, memberCodegen, state);
generateParameterAnnotations(
annotationsOwner, mv, jvmSignature,
annotationsOwner.getValueParameters(),
memberCodegen, state, skipNullabilityAnnotations
);
}
@NotNull
@@ -495,25 +503,14 @@ public class FunctionCodegen {
return descriptor != null && !InlineUtil.isInlineOrContainingInline(descriptor);
}
public static void generateParameterAnnotations(
@NotNull FunctionDescriptor functionDescriptor,
@NotNull MethodVisitor mv,
@NotNull JvmMethodSignature jvmSignature,
@NotNull MemberCodegen<?> memberCodegen,
@NotNull GenerationState state
) {
generateParameterAnnotations(
functionDescriptor, mv, jvmSignature, functionDescriptor.getValueParameters(), memberCodegen, state
);
}
public static void generateParameterAnnotations(
@NotNull FunctionDescriptor functionDescriptor,
@NotNull MethodVisitor mv,
@NotNull JvmMethodSignature jvmSignature,
@NotNull List<ValueParameterDescriptor> valueParameters,
@NotNull MemberCodegen<?> memberCodegen,
@NotNull GenerationState state
@NotNull GenerationState state,
boolean skipNullabilityAnnotations
) {
if (isAccessor(functionDescriptor)) return;
@@ -542,7 +539,7 @@ public class FunctionCodegen {
if (annotated != null) {
//noinspection ConstantConditions
int parameterIndex = i - syntheticParameterCount;
AnnotationCodegen.forParameter(parameterIndex, mv, memberCodegen, state)
AnnotationCodegen.forParameter(parameterIndex, mv, memberCodegen, state, skipNullabilityAnnotations)
.genAnnotations(annotated, parameterSignature.getAsmType(), annotated.getReturnType(), functionDescriptor, Collections.emptyList());
}
}
@@ -49,7 +49,8 @@ import java.lang.annotation.RetentionPolicy
abstract class AnnotationCodegen(
private val innerClassConsumer: InnerClassConsumer,
private val context: JvmBackendContext
private val context: JvmBackendContext,
private val skipNullabilityAnnotations: Boolean = false
) {
private val typeMapper = context.typeMapper
private val methodSignatureMapper = context.methodSignatureMapper
@@ -114,10 +115,8 @@ abstract class AnnotationCodegen(
returnType: Type?,
annotationDescriptorsAlreadyPresent: MutableSet<String>
) {
if (annotated is IrDeclaration) {
if (returnType != null && !AsmUtil.isPrimitive(returnType)) {
generateNullabilityAnnotationForCallable(annotated, annotationDescriptorsAlreadyPresent)
}
if (!skipNullabilityAnnotations && annotated is IrDeclaration && returnType != null && !AsmUtil.isPrimitive(returnType)) {
generateNullabilityAnnotationForCallable(annotated, annotationDescriptorsAlreadyPresent)
}
}
@@ -72,7 +72,8 @@ class FunctionCodegen(
if (irFunction.origin != IrDeclarationOrigin.FUNCTION_FOR_DEFAULT_PARAMETER &&
irFunction.origin != JvmLoweredDeclarationOrigin.SYNTHETIC_ACCESSOR
) {
object : AnnotationCodegen(classCodegen, context) {
val skipNullabilityAnnotations = flags and Opcodes.ACC_PRIVATE != 0 || flags and Opcodes.ACC_SYNTHETIC != 0
object : AnnotationCodegen(classCodegen, context, skipNullabilityAnnotations) {
override fun visitAnnotation(descr: String?, visible: Boolean): AnnotationVisitor {
return methodVisitor.visitAnnotation(descr, visible)
}
@@ -86,7 +87,7 @@ class FunctionCodegen(
// Not generating parameter annotations for default stubs fixes KT-7892, though
// this certainly looks like a workaround for a javac bug.
if (irFunction !is IrConstructor || !irFunction.parentAsClass.shouldNotGenerateConstructorParameterAnnotations()) {
generateParameterAnnotations(irFunction, methodVisitor, signature, classCodegen, context)
generateParameterAnnotations(irFunction, methodVisitor, signature, classCodegen, context, skipNullabilityAnnotations)
}
}
@@ -218,50 +219,52 @@ class FunctionCodegen(
}
return frameMap
}
}
// Borrowed from org.jetbrains.kotlin.codegen.FunctionCodegen.java
private fun generateParameterAnnotations(
irFunction: IrFunction,
mv: MethodVisitor,
jvmSignature: JvmMethodSignature,
innerClassConsumer: InnerClassConsumer,
context: JvmBackendContext
) {
val iterator = irFunction.valueParameters.iterator()
val kotlinParameterTypes = jvmSignature.valueParameters
val syntheticParameterCount = kotlinParameterTypes.count { it.kind.isSkippedInGenericSignature }
// Borrowed from org.jetbrains.kotlin.codegen.FunctionCodegen.java
private fun generateParameterAnnotations(
irFunction: IrFunction,
mv: MethodVisitor,
jvmSignature: JvmMethodSignature,
innerClassConsumer: InnerClassConsumer,
context: JvmBackendContext,
skipNullabilityAnnotations: Boolean = false
) {
val iterator = irFunction.valueParameters.iterator()
val kotlinParameterTypes = jvmSignature.valueParameters
val syntheticParameterCount = kotlinParameterTypes.count { it.kind.isSkippedInGenericSignature }
visitAnnotableParameterCount(mv, kotlinParameterTypes.size - syntheticParameterCount)
visitAnnotableParameterCount(mv, kotlinParameterTypes.size - syntheticParameterCount)
kotlinParameterTypes.forEachIndexed { i, parameterSignature ->
val kind = parameterSignature.kind
val annotated = when (kind) {
JvmMethodParameterKind.RECEIVER -> irFunction.extensionReceiverParameter
else -> iterator.next()
}
kotlinParameterTypes.forEachIndexed { i, parameterSignature ->
val kind = parameterSignature.kind
val annotated = when (kind) {
JvmMethodParameterKind.RECEIVER -> irFunction.extensionReceiverParameter
else -> iterator.next()
}
if (annotated != null && !kind.isSkippedInGenericSignature && !annotated.isSyntheticMarkerParameter()) {
object : AnnotationCodegen(innerClassConsumer, context) {
override fun visitAnnotation(descr: String?, visible: Boolean): AnnotationVisitor {
return mv.visitParameterAnnotation(
i - syntheticParameterCount,
descr,
visible
)
}
if (annotated != null && !kind.isSkippedInGenericSignature && !annotated.isSyntheticMarkerParameter()) {
object : AnnotationCodegen(innerClassConsumer, context, skipNullabilityAnnotations) {
override fun visitAnnotation(descr: String?, visible: Boolean): AnnotationVisitor {
return mv.visitParameterAnnotation(
i - syntheticParameterCount,
descr,
visible
)
}
override fun visitTypeAnnotation(descr: String?, path: TypePath?, visible: Boolean): AnnotationVisitor {
return mv.visitTypeAnnotation(
TypeReference.newFormalParameterReference(i - syntheticParameterCount).value,
path, descr, visible
)
}
}.genAnnotations(annotated, parameterSignature.asmType, annotated.type)
override fun visitTypeAnnotation(descr: String?, path: TypePath?, visible: Boolean): AnnotationVisitor {
return mv.visitTypeAnnotation(
TypeReference.newFormalParameterReference(i - syntheticParameterCount).value,
path, descr, visible
)
}
}.genAnnotations(annotated, parameterSignature.asmType, annotated.type)
}
}
}
}
private fun IrValueParameter.isSyntheticMarkerParameter(): Boolean =
origin == IrDeclarationOrigin.DEFAULT_CONSTRUCTOR_MARKER ||
origin == JvmLoweredDeclarationOrigin.SYNTHETIC_MARKER_PARAMETER
@@ -15,7 +15,7 @@ public final class _2Kt$complicatedCast$1$1 {
@kotlin.Metadata
public final class _2Kt {
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public synthetic final static method complicatedCast(@org.jetbrains.annotations.Nullable p0: java.lang.Object): java.lang.Object
public synthetic final static method complicatedCast(p0: java.lang.Object): java.lang.Object
}
@kotlin.Metadata
@@ -16,7 +16,7 @@ public final class _2Kt$complicatedCast$1$1 {
public final class _2Kt {
inner class _2Kt$complicatedCast$1$1
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public synthetic final static method complicatedCast(@org.jetbrains.annotations.Nullable p0: java.lang.Object): java.lang.Object
public synthetic final static method complicatedCast(p0: java.lang.Object): java.lang.Object
}
@kotlin.Metadata
@@ -1,5 +1,5 @@
@kotlin.Metadata
public final class PrivateAccessorKt {
synthetic final static @org.jetbrains.annotations.Nullable method bar(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.experimental.Continuation): java.lang.Object
synthetic final static method bar(p0: kotlin.coroutines.experimental.Continuation): java.lang.Object
private final static method foo(): void
}
@@ -1,5 +1,5 @@
@kotlin.Metadata
public final class PrivateAccessorKt {
synthetic final static @org.jetbrains.annotations.Nullable method bar(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
synthetic final static method bar(p0: kotlin.coroutines.Continuation): java.lang.Object
private final static method foo(): void
}
@@ -1,10 +1,10 @@
@kotlin.Metadata
public final class A {
public method <init>(): void
synthetic final @org.jetbrains.annotations.Nullable method foo(@org.jetbrains.annotations.Nullable p0: java.lang.Object): java.lang.Object
synthetic final method foo(p0: java.lang.Object): java.lang.Object
}
@kotlin.Metadata
public final class PrivateSuspendFunKt {
synthetic final static @org.jetbrains.annotations.Nullable method foo(@org.jetbrains.annotations.Nullable p0: java.lang.Object): java.lang.Object
synthetic final static method foo(p0: java.lang.Object): java.lang.Object
}
@@ -1,7 +1,7 @@
@kotlin.Metadata
public class AbstractStuff {
public method <init>(): void
public synthetic final @org.jetbrains.annotations.Nullable method hello(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: COROUTINES_PACKAGE.Continuation): java.lang.Object
public synthetic final method hello(p0: java.lang.Object, p1: COROUTINES_PACKAGE.Continuation): java.lang.Object
}
@kotlin.Metadata
@@ -1,11 +1,11 @@
@kotlin.Metadata
public final class test/Foo {
public final static method foo(): void
public synthetic final static @org.jetbrains.annotations.NotNull method getExtProp(p0: java.lang.Object): java.lang.String
public synthetic final static method getExtProp(p0: java.lang.Object): java.lang.String
}
@kotlin.Metadata
synthetic final class test/Foo__InlineReifiedPropertyMultifileKt {
public final static method foo(): void
public synthetic final static @org.jetbrains.annotations.NotNull method getExtProp(p0: java.lang.Object): java.lang.String
public synthetic final static method getExtProp(p0: java.lang.Object): java.lang.String
}
@@ -1,10 +1,10 @@
@kotlin.Metadata
public final class Foo {
public method <init>(): void
public synthetic final @org.jetbrains.annotations.NotNull method getExtProp(p0: java.lang.Object): java.lang.String
public synthetic final method getExtProp(p0: java.lang.Object): java.lang.String
}
@kotlin.Metadata
public final class InlineReifiedPropertyKt {
public synthetic final static @org.jetbrains.annotations.NotNull method getExtProp(p0: java.lang.Object): java.lang.String
public synthetic final static method getExtProp(p0: java.lang.Object): java.lang.String
}
@@ -7,8 +7,8 @@ public final class Foo {
private final @org.jetbrains.annotations.Nullable method generic$$forInline(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
public final @org.jetbrains.annotations.Nullable method generic(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
public final @org.jetbrains.annotations.Nullable method generic(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final @org.jetbrains.annotations.Nullable method genericWithReified(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final @org.jetbrains.annotations.Nullable method genericWithReified(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final method genericWithReified(p0: java.lang.Object, p1: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final method genericWithReified(p0: kotlin.coroutines.Continuation): java.lang.Object
private synthetic final method privateInline(p0: kotlin.coroutines.Continuation): java.lang.Object
private final @kotlin.internal.InlineOnly method shouldNotHaveSuffix(p0: kotlin.coroutines.Continuation): java.lang.Object
private final @org.jetbrains.annotations.Nullable method simple$$forInline(@org.jetbrains.annotations.NotNull p0: kotlin.Unit, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
@@ -25,8 +25,8 @@ public final class SimpleNamedKt {
private final static @org.jetbrains.annotations.Nullable method generic$$forInline(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
public final static @org.jetbrains.annotations.Nullable method generic(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
public final static @org.jetbrains.annotations.Nullable method generic(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final static @org.jetbrains.annotations.Nullable method genericWithReified(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final static @org.jetbrains.annotations.Nullable method genericWithReified(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final static method genericWithReified(p0: java.lang.Object, p1: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final static method genericWithReified(p0: kotlin.coroutines.Continuation): java.lang.Object
private synthetic final static method privateInline(p0: kotlin.coroutines.Continuation): java.lang.Object
private final static @kotlin.internal.InlineOnly method shouldNotHaveSuffix(p0: kotlin.coroutines.Continuation): java.lang.Object
private final static @org.jetbrains.annotations.Nullable method simple$$forInline(@org.jetbrains.annotations.NotNull p0: kotlin.Unit, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
@@ -7,10 +7,10 @@ public final class Foo {
private final method generic$$forInline(p0: kotlin.coroutines.Continuation): java.lang.Object
public final @org.jetbrains.annotations.Nullable method generic(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
public final @org.jetbrains.annotations.Nullable method generic(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final @org.jetbrains.annotations.Nullable method genericWithReified(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final @org.jetbrains.annotations.Nullable method genericWithReified(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final method genericWithReified(p0: java.lang.Object, p1: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final method genericWithReified(p0: kotlin.coroutines.Continuation): java.lang.Object
private final method privateInline(p0: kotlin.coroutines.Continuation): java.lang.Object
private final @kotlin.internal.InlineOnly @org.jetbrains.annotations.Nullable method shouldNotHaveSuffix(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
private final @kotlin.internal.InlineOnly method shouldNotHaveSuffix(p0: kotlin.coroutines.Continuation): java.lang.Object
private final method simple$$forInline(p0: kotlin.Unit, p1: kotlin.coroutines.Continuation): java.lang.Object
private final method simple$$forInline(p0: kotlin.coroutines.Continuation): java.lang.Object
public final @org.jetbrains.annotations.Nullable method simple(@org.jetbrains.annotations.NotNull p0: kotlin.Unit, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
@@ -25,10 +25,10 @@ public final class SimpleNamedKt {
private final static method generic$$forInline(p0: kotlin.coroutines.Continuation): java.lang.Object
public final static @org.jetbrains.annotations.Nullable method generic(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
public final static @org.jetbrains.annotations.Nullable method generic(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final static @org.jetbrains.annotations.Nullable method genericWithReified(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final static @org.jetbrains.annotations.Nullable method genericWithReified(p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final static method genericWithReified(p0: java.lang.Object, p1: kotlin.coroutines.Continuation): java.lang.Object
public synthetic final static method genericWithReified(p0: kotlin.coroutines.Continuation): java.lang.Object
private final static method privateInline(p0: kotlin.coroutines.Continuation): java.lang.Object
private final static @kotlin.internal.InlineOnly @org.jetbrains.annotations.Nullable method shouldNotHaveSuffix(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
private final static @kotlin.internal.InlineOnly method shouldNotHaveSuffix(p0: kotlin.coroutines.Continuation): java.lang.Object
private final static method simple$$forInline(p0: kotlin.Unit, p1: kotlin.coroutines.Continuation): java.lang.Object
private final static method simple$$forInline(p0: kotlin.coroutines.Continuation): java.lang.Object
public final static @org.jetbrains.annotations.Nullable method simple(@org.jetbrains.annotations.NotNull p0: kotlin.Unit, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
@@ -55,7 +55,7 @@ public final class Test {
public final class Z {
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Z
public synthetic final static method box-impl(p0: int): Z
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -14,7 +14,7 @@ public final class Foo {
inner class Foo$Companion
static method <clinit>(): void
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Foo
public synthetic final static method box-impl(p0: int): Foo
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -2,7 +2,7 @@
public final class Foo {
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Foo
public synthetic final static method box-impl(p0: int): Foo
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -2,7 +2,7 @@
public final class Test {
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Test
public synthetic final static method box-impl(p0: int): Test
public synthetic static method constructor-impl$default(p0: int, p1: int, p2: int, p3: int, p4: kotlin.jvm.internal.DefaultConstructorMarker): int
public synthetic static method constructor-impl$default(p0: int, p1: int, p2: kotlin.jvm.internal.DefaultConstructorMarker): int
public static method constructor-impl(p0: int): int
@@ -2,7 +2,7 @@
public final class Z {
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Z
public synthetic final static method box-impl(p0: int): Z
public static method constructor-impl(p0: int): int
public static method constructor-impl(p0: int, p1: int): int
public static method constructor-impl(p0: long): int
@@ -68,7 +68,7 @@ public abstract class TestSealed {
public final class Z {
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Z
public synthetic final static method box-impl(p0: int): Z
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -2,7 +2,7 @@
public final class Z1 {
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Z1
public synthetic final static method box-impl(p0: int): Z1
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -21,7 +21,7 @@ public final class Z2 {
private synthetic method <init>(p0: int): void
public final static method bar-E2ud15U(p0: int, p1: int): void
public final static method bar-cYvoCnY(p0: int, p1: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Z2
public synthetic final static method box-impl(p0: int): Z2
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -49,7 +49,7 @@ public interface IFoo {
public final class Z {
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Z
public synthetic final static method box-impl(p0: int): Z
public static method constructor-impl(p0: int): int
public static method constructor-impl(p0: long): int
public method equals(p0: java.lang.Object): boolean
@@ -7,7 +7,7 @@ public interface A {
public final class Foo {
private final field x: long
private synthetic method <init>(p0: long): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: long): Foo
public synthetic final static method box-impl(p0: long): Foo
public static method constructor-impl(p0: long): long
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: long, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -21,8 +21,8 @@ public final class NullabilityInExpansionKt {
@kotlin.Metadata
public final class Q1 {
private final field x: java.lang.Integer
private synthetic method <init>(@org.jetbrains.annotations.Nullable p0: java.lang.Integer): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.Nullable p0: java.lang.Integer): Q1
private synthetic method <init>(p0: java.lang.Integer): void
public synthetic final static method box-impl(p0: java.lang.Integer): Q1
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: java.lang.Integer): java.lang.Integer
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.Integer, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -32,14 +32,14 @@ public final class Q1 {
public static method hashCode-impl(p0: java.lang.Integer): int
public method toString(): java.lang.String
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: java.lang.Integer): java.lang.String
public synthetic final @org.jetbrains.annotations.Nullable method unbox-impl(): java.lang.Integer
public synthetic final method unbox-impl(): java.lang.Integer
}
@kotlin.Metadata
public final class Q2 {
private final field z: java.lang.Integer
private synthetic method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.Integer): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.NotNull p0: java.lang.Integer): Q2
private synthetic method <init>(p0: java.lang.Integer): void
public synthetic final static method box-impl(p0: java.lang.Integer): Q2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.Integer): java.lang.Integer
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.Integer, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -49,14 +49,14 @@ public final class Q2 {
public static method hashCode-impl(p0: java.lang.Integer): int
public method toString(): java.lang.String
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: java.lang.Integer): java.lang.String
public synthetic final @org.jetbrains.annotations.NotNull method unbox-impl(): java.lang.Integer
public synthetic final method unbox-impl(): java.lang.Integer
}
@kotlin.Metadata
public final class QN {
private final field z: Q1
private synthetic method <init>(@org.jetbrains.annotations.Nullable p0: Q1): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.Nullable p0: Q1): QN
private synthetic method <init>(p0: Q1): void
public synthetic final static method box-impl(p0: Q1): QN
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: Q1): Q1
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: Q1, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -66,14 +66,14 @@ public final class QN {
public static method hashCode-impl(p0: Q1): int
public method toString(): java.lang.String
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: Q1): java.lang.String
public synthetic final @org.jetbrains.annotations.Nullable method unbox-impl(): Q1
public synthetic final method unbox-impl(): Q1
}
@kotlin.Metadata
public final class S1 {
private final field x: java.lang.String
private synthetic method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): S1
private synthetic method <init>(p0: java.lang.String): void
public synthetic final static method box-impl(p0: java.lang.String): S1
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -83,14 +83,14 @@ public final class S1 {
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final @org.jetbrains.annotations.NotNull method unbox-impl(): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@kotlin.Metadata
public final class S2 {
private final field z: java.lang.String
private synthetic method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): S2
private synthetic method <init>(p0: java.lang.String): void
public synthetic final static method box-impl(p0: java.lang.String): S2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -100,14 +100,14 @@ public final class S2 {
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final @org.jetbrains.annotations.NotNull method unbox-impl(): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@kotlin.Metadata
public final class SN {
private final field z: java.lang.String
private synthetic method <init>(@org.jetbrains.annotations.Nullable p0: java.lang.String): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.Nullable p0: java.lang.String): SN
private synthetic method <init>(p0: java.lang.String): void
public synthetic final static method box-impl(p0: java.lang.String): SN
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -117,14 +117,14 @@ public final class SN {
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final @org.jetbrains.annotations.Nullable method unbox-impl(): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@kotlin.Metadata
public final class SN2 {
private final field z: java.lang.String
private synthetic method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): SN2
private synthetic method <init>(p0: java.lang.String): void
public synthetic final static method box-impl(p0: java.lang.String): SN2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -134,14 +134,14 @@ public final class SN2 {
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final @org.jetbrains.annotations.NotNull method unbox-impl(): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@kotlin.Metadata
public final class W1 {
private final field x: java.lang.String
private synthetic method <init>(@org.jetbrains.annotations.Nullable p0: java.lang.String): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.Nullable p0: java.lang.String): W1
private synthetic method <init>(p0: java.lang.String): void
public synthetic final static method box-impl(p0: java.lang.String): W1
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -151,14 +151,14 @@ public final class W1 {
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final @org.jetbrains.annotations.Nullable method unbox-impl(): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@kotlin.Metadata
public final class W2 {
private final field z: java.lang.String
private synthetic method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): W2
private synthetic method <init>(p0: java.lang.String): void
public synthetic final static method box-impl(p0: java.lang.String): W2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: java.lang.String, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -168,14 +168,14 @@ public final class W2 {
public static method hashCode-impl(p0: java.lang.String): int
public method toString(): java.lang.String
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: java.lang.String): java.lang.String
public synthetic final @org.jetbrains.annotations.NotNull method unbox-impl(): java.lang.String
public synthetic final method unbox-impl(): java.lang.String
}
@kotlin.Metadata
public final class WN {
private final field z: W1
private synthetic method <init>(@org.jetbrains.annotations.Nullable p0: W1): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.Nullable p0: W1): WN
private synthetic method <init>(p0: W1): void
public synthetic final static method box-impl(p0: W1): WN
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: W1): W1
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: W1, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -185,14 +185,14 @@ public final class WN {
public static method hashCode-impl(p0: W1): int
public method toString(): java.lang.String
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: W1): java.lang.String
public synthetic final @org.jetbrains.annotations.Nullable method unbox-impl(): W1
public synthetic final method unbox-impl(): W1
}
@kotlin.Metadata
public final class Z1 {
private final field x: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Z1
public synthetic final static method box-impl(p0: int): Z1
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -209,7 +209,7 @@ public final class Z1 {
public final class Z2 {
private final field z: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Z2
public synthetic final static method box-impl(p0: int): Z2
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -225,8 +225,8 @@ public final class Z2 {
@kotlin.Metadata
public final class ZN {
private final field z: Z1
private synthetic method <init>(@org.jetbrains.annotations.Nullable p0: Z1): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.Nullable p0: Z1): ZN
private synthetic method <init>(p0: Z1): void
public synthetic final static method box-impl(p0: Z1): ZN
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: Z1): Z1
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: Z1, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -236,14 +236,14 @@ public final class ZN {
public static method hashCode-impl(p0: Z1): int
public method toString(): java.lang.String
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: Z1): java.lang.String
public synthetic final @org.jetbrains.annotations.Nullable method unbox-impl(): Z1
public synthetic final method unbox-impl(): Z1
}
@kotlin.Metadata
public final class ZN2 {
private final field z: Z1
private synthetic method <init>(@org.jetbrains.annotations.NotNull p0: Z1): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(@org.jetbrains.annotations.NotNull p0: Z1): ZN2
private synthetic method <init>(p0: Z1): void
public synthetic final static method box-impl(p0: Z1): ZN2
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: Z1): Z1
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: Z1, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -253,5 +253,5 @@ public final class ZN2 {
public static method hashCode-impl(p0: Z1): int
public method toString(): java.lang.String
public static @org.jetbrains.annotations.NotNull method toString-impl(p0: Z1): java.lang.String
public synthetic final @org.jetbrains.annotations.NotNull method unbox-impl(): Z1
public synthetic final method unbox-impl(): Z1
}
@@ -7,7 +7,7 @@ public interface IValue {
public final class TestInternal {
private final field value: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): TestInternal
public synthetic final static method box-impl(p0: int): TestInternal
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -23,7 +23,7 @@ public final class TestInternal {
public final class TestOverriding {
private final field value: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): TestOverriding
public synthetic final static method box-impl(p0: int): TestOverriding
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -40,7 +40,7 @@ public final class TestOverriding {
public final class TestPrivate {
private final field value: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): TestPrivate
public synthetic final static method box-impl(p0: int): TestPrivate
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -56,7 +56,7 @@ public final class TestPrivate {
public final class TestPublic {
private final field value: int
private synthetic method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): TestPublic
public synthetic final static method box-impl(p0: int): TestPublic
public static method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -2,7 +2,7 @@
public final class Z {
private final field value: int
private synthetic @kotlin.PublishedApi method <init>(p0: int): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: int): Z
public synthetic final static method box-impl(p0: int): Z
public static @kotlin.PublishedApi method constructor-impl(p0: int): int
public method equals(p0: java.lang.Object): boolean
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
@@ -2,7 +2,7 @@
public final class Foo {
private final field l: long
private synthetic method <init>(p0: long): void
public synthetic final static @org.jetbrains.annotations.NotNull method box-impl(p0: long): Foo
public synthetic final static method box-impl(p0: long): Foo
public static method constructor-impl(p0: long): long
public final static method empty-impl(p0: long): void
public method equals(p0: java.lang.Object): boolean
@@ -14,7 +14,7 @@ final class test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0 {
@kotlin.Metadata
public final class test/SamAdapterAndInlinedOneKt {
public synthetic final static @org.jetbrains.annotations.NotNull method makeRunnable(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
public synthetic final static method makeRunnable(p0: kotlin.jvm.functions.Function0): java.lang.Runnable
public final static @org.jetbrains.annotations.NotNull method makeRunnable2(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
public final static @org.jetbrains.annotations.NotNull method noInline(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
public final static @org.jetbrains.annotations.NotNull method noInline2(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
@@ -23,7 +23,6 @@ import java.lang.System;
@kotlin.Metadata()
@Anno()
public final class User {
@org.jetbrains.annotations.NotNull()
private final java.lang.String name = "John";
@org.jetbrains.annotations.NotNull()
@@ -25,7 +25,6 @@ import java.lang.System;
public final class State {
private final int someInt = 0;
private final long someLong = 0L;
@org.jetbrains.annotations.NotNull()
private final java.lang.String someString = null;
public final int getSomeInt() {