Support new convention for local variables name mangling: '$receiver' -> '$this$<label>' (KT-26913)
This commit is contained in:
@@ -103,6 +103,8 @@ public class AsmUtil {
|
||||
|
||||
public static final String LABELED_THIS_FIELD = THIS + "_";
|
||||
|
||||
public static final String LABELED_THIS_PARAMETER = "$" + THIS + "$";
|
||||
|
||||
public static final String CAPTURED_THIS_FIELD = "this$0";
|
||||
|
||||
public static final String RECEIVER_PARAMETER_NAME = "$receiver";
|
||||
@@ -141,13 +143,35 @@ public class AsmUtil {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String getLabeledThisNameForReceiver(
|
||||
public static String getNameForCapturedReceiverField(
|
||||
@NotNull CallableDescriptor descriptor,
|
||||
@NotNull BindingContext bindingContext,
|
||||
@NotNull LanguageVersionSettings languageVersionSettings
|
||||
) {
|
||||
return getLabeledThisNameForReceiver(
|
||||
descriptor, bindingContext, languageVersionSettings, LABELED_THIS_FIELD, CAPTURED_RECEIVER_FIELD);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String getNameForReceiverParameter(
|
||||
@NotNull CallableDescriptor descriptor,
|
||||
@NotNull BindingContext bindingContext,
|
||||
@NotNull LanguageVersionSettings languageVersionSettings
|
||||
) {
|
||||
return getLabeledThisNameForReceiver(
|
||||
descriptor, bindingContext, languageVersionSettings, LABELED_THIS_PARAMETER, RECEIVER_PARAMETER_NAME);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String getLabeledThisNameForReceiver(
|
||||
@NotNull CallableDescriptor descriptor,
|
||||
@NotNull BindingContext bindingContext,
|
||||
@NotNull LanguageVersionSettings languageVersionSettings,
|
||||
@NotNull String prefix,
|
||||
@NotNull String defaultName
|
||||
) {
|
||||
if (!languageVersionSettings.supportsFeature(LanguageFeature.NewCapturedReceiverFieldNamingConvention)) {
|
||||
return CAPTURED_RECEIVER_FIELD;
|
||||
return defaultName;
|
||||
}
|
||||
|
||||
Name callableName = null;
|
||||
@@ -155,7 +179,7 @@ public class AsmUtil {
|
||||
if (descriptor instanceof FunctionDescriptor) {
|
||||
String labelName = bindingContext.get(CodegenBinding.CALL_LABEL_FOR_LAMBDA_ARGUMENT, (FunctionDescriptor) descriptor);
|
||||
if (labelName != null) {
|
||||
return getLabeledThisName(labelName, CAPTURED_RECEIVER_FIELD);
|
||||
return getLabeledThisName(labelName, prefix, defaultName);
|
||||
}
|
||||
|
||||
if (descriptor instanceof VariableAccessorDescriptor) {
|
||||
@@ -169,23 +193,23 @@ public class AsmUtil {
|
||||
}
|
||||
|
||||
if (callableName.isSpecial()) {
|
||||
return CAPTURED_RECEIVER_FIELD;
|
||||
return defaultName;
|
||||
}
|
||||
|
||||
return getLabeledThisName(callableName.asString(), CAPTURED_RECEIVER_FIELD);
|
||||
return getLabeledThisName(callableName.asString(), prefix, defaultName);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String getLabeledThisName(@NotNull String callableName, @NotNull String defaultName) {
|
||||
public static String getLabeledThisName(@NotNull String callableName, @NotNull String prefix, @NotNull String defaultName) {
|
||||
if (!Name.isValidIdentifier(callableName)) {
|
||||
return defaultName;
|
||||
}
|
||||
|
||||
if (!DalvikIdentifierUtils.isValidDalvikIdentifier(callableName)) {
|
||||
return LABELED_THIS_FIELD + mangleLabel(callableName);
|
||||
return prefix + mangleLabel(callableName);
|
||||
}
|
||||
|
||||
return LABELED_THIS_FIELD + callableName;
|
||||
return prefix + callableName;
|
||||
}
|
||||
|
||||
private static String mangleLabel(String label) {
|
||||
@@ -925,7 +949,8 @@ public class AsmUtil {
|
||||
if (descriptor.isOperator()) {
|
||||
ReceiverParameterDescriptor receiverParameter = descriptor.getExtensionReceiverParameter();
|
||||
if (receiverParameter != null) {
|
||||
genParamAssertion(v, state.getTypeMapper(), frameMap, receiverParameter, CAPTURED_RECEIVER_FIELD, descriptor);
|
||||
String name = getNameForReceiverParameter(descriptor, state.getBindingContext(), state.getLanguageVersionSettings());
|
||||
genParamAssertion(v, state.getTypeMapper(), frameMap, receiverParameter, name, descriptor);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -933,7 +958,8 @@ public class AsmUtil {
|
||||
|
||||
ReceiverParameterDescriptor receiverParameter = descriptor.getExtensionReceiverParameter();
|
||||
if (receiverParameter != null) {
|
||||
genParamAssertion(v, state.getTypeMapper(), frameMap, receiverParameter, CAPTURED_RECEIVER_FIELD, descriptor);
|
||||
String name = getNameForReceiverParameter(descriptor, state.getBindingContext(), state.getLanguageVersionSettings());
|
||||
genParamAssertion(v, state.getTypeMapper(), frameMap, receiverParameter, name, descriptor);
|
||||
}
|
||||
|
||||
for (ValueParameterDescriptor parameter : descriptor.getValueParameters()) {
|
||||
|
||||
+2
-2
@@ -160,7 +160,7 @@ class DefaultParameterValueSubstitutor(val state: GenerationState) {
|
||||
|
||||
if (!state.classBuilderMode.generateBodies) {
|
||||
FunctionCodegen.generateLocalVariablesForParameters(
|
||||
mv, signature, null, Label(), Label(), remainingParameters, isStatic, typeMapper
|
||||
mv, signature, functionDescriptor, null, Label(), Label(), remainingParameters, isStatic, typeMapper
|
||||
)
|
||||
mv.visitEnd()
|
||||
return
|
||||
@@ -245,7 +245,7 @@ class DefaultParameterValueSubstitutor(val state: GenerationState) {
|
||||
mv.visitLabel(methodEnd)
|
||||
|
||||
FunctionCodegen.generateLocalVariablesForParameters(
|
||||
mv, signature, null, methodBegin, methodEnd, remainingParameters, isStatic, typeMapper
|
||||
mv, signature, functionDescriptor, null, methodBegin, methodEnd, remainingParameters, isStatic, typeMapper
|
||||
)
|
||||
|
||||
FunctionCodegen.endVisit(mv, null, methodElement)
|
||||
|
||||
@@ -784,7 +784,7 @@ public class FunctionCodegen {
|
||||
}
|
||||
|
||||
generateLocalVariablesForParameters(mv,
|
||||
jvmMethodSignature,
|
||||
jvmMethodSignature, functionDescriptor,
|
||||
thisType, methodBegin, methodEnd, functionDescriptor.getValueParameters(),
|
||||
destructuredParametersForSuspendLambda,
|
||||
AsmUtil.isStaticMethod(ownerKind, functionDescriptor), typeMapper, shiftForDestructuringVariables
|
||||
@@ -794,6 +794,7 @@ public class FunctionCodegen {
|
||||
public static void generateLocalVariablesForParameters(
|
||||
@NotNull MethodVisitor mv,
|
||||
@NotNull JvmMethodSignature jvmMethodSignature,
|
||||
@NotNull FunctionDescriptor functionDescriptor,
|
||||
@Nullable Type thisType,
|
||||
@NotNull Label methodBegin,
|
||||
@NotNull Label methodEnd,
|
||||
@@ -802,13 +803,15 @@ public class FunctionCodegen {
|
||||
KotlinTypeMapper typeMapper
|
||||
) {
|
||||
generateLocalVariablesForParameters(
|
||||
mv, jvmMethodSignature, thisType, methodBegin, methodEnd, valueParameters, Collections.emptyList(), isStatic, typeMapper,
|
||||
mv, jvmMethodSignature, functionDescriptor,
|
||||
thisType, methodBegin, methodEnd, valueParameters, Collections.emptyList(), isStatic, typeMapper,
|
||||
0);
|
||||
}
|
||||
|
||||
private static void generateLocalVariablesForParameters(
|
||||
@NotNull MethodVisitor mv,
|
||||
@NotNull JvmMethodSignature jvmMethodSignature,
|
||||
@NotNull FunctionDescriptor functionDescriptor,
|
||||
@Nullable Type thisType,
|
||||
@NotNull Label methodBegin,
|
||||
@NotNull Label methodEnd,
|
||||
@@ -847,6 +850,10 @@ public class FunctionCodegen {
|
||||
? computeParameterName(i, parameter)
|
||||
: nameForDestructuredParameter;
|
||||
}
|
||||
else if (kind == JvmMethodParameterKind.RECEIVER) {
|
||||
parameterName = AsmUtil.getNameForReceiverParameter(
|
||||
functionDescriptor, typeMapper.getBindingContext(), typeMapper.getLanguageVersionSettings());
|
||||
}
|
||||
else {
|
||||
String lowercaseKind = kind.name().toLowerCase();
|
||||
parameterName = needIndexForVar(kind)
|
||||
|
||||
@@ -111,7 +111,7 @@ public final class MutableClosure implements CalculatedClosure {
|
||||
return AsmUtil.CAPTURED_RECEIVER_FIELD;
|
||||
}
|
||||
|
||||
String labeledThis = AsmUtil.getLabeledThisNameForReceiver(
|
||||
String labeledThis = AsmUtil.getNameForCapturedReceiverField(
|
||||
enclosingFunWithReceiverDescriptor, bindingContext, languageVersionSettings);
|
||||
|
||||
return AsmUtil.getCapturedFieldName(labeledThis);
|
||||
|
||||
@@ -46,7 +46,9 @@ internal fun generateParameterNames(
|
||||
isEnumName = !isEnumName
|
||||
if (!isEnumName) "\$enum\$name" else "\$enum\$ordinal"
|
||||
}
|
||||
JvmMethodParameterKind.RECEIVER -> AsmUtil.RECEIVER_PARAMETER_NAME
|
||||
JvmMethodParameterKind.RECEIVER -> {
|
||||
AsmUtil.getNameForReceiverParameter(functionDescriptor, state.bindingContext, state.languageVersionSettings)
|
||||
}
|
||||
JvmMethodParameterKind.OUTER -> AsmUtil.CAPTURED_THIS_FIELD
|
||||
JvmMethodParameterKind.VALUE -> iterator.next().name.asString()
|
||||
|
||||
|
||||
@@ -217,6 +217,10 @@ public class KotlinTypeMapper {
|
||||
return jvmTarget;
|
||||
}
|
||||
|
||||
public LanguageVersionSettings getLanguageVersionSettings() {
|
||||
return languageVersionSettings;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Type mapOwner(@NotNull DeclarationDescriptor descriptor) {
|
||||
return mapOwner(descriptor, true);
|
||||
|
||||
@@ -5,21 +5,21 @@ public final class DeepInlineKt : java/lang/Object {
|
||||
1 $i$f$block: I
|
||||
}
|
||||
|
||||
public final static void foo(java.lang.String $receiver, int $i$a$-block-DeepInlineKt$foo$1$1$1) {
|
||||
public final static void foo(java.lang.String $this$block, int $i$a$-block-DeepInlineKt$foo$1$1$1) {
|
||||
Local variables:
|
||||
14 $receiver: J
|
||||
14 $this$block: J
|
||||
16 $i$a$-block-DeepInlineKt$foo$1$1$1: I
|
||||
13 $i$f$block: I
|
||||
12 z: Z
|
||||
9 $receiver: J
|
||||
9 $this$block: J
|
||||
11 $i$a$-block-DeepInlineKt$foo$1$1: I
|
||||
8 $i$f$block: I
|
||||
7 y: Z
|
||||
4 $receiver: J
|
||||
4 $this$block: J
|
||||
6 $i$a$-block-DeepInlineKt$foo$1: I
|
||||
3 $i$f$block: I
|
||||
2 x: Z
|
||||
0 $receiver: Ljava/lang/String;
|
||||
0 $this$foo: Ljava/lang/String;
|
||||
1 count: I
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -5,21 +5,21 @@ public final class DeepInlineWithLabelsKt : java/lang/Object {
|
||||
1 $i$f$block: I
|
||||
}
|
||||
|
||||
public final static void foo(java.lang.String $receiver, int $i$a$-block-DeepInlineWithLabelsKt$foo$1$1$1) {
|
||||
public final static void foo(java.lang.String $this$b3, int $i$a$-block-DeepInlineWithLabelsKt$foo$1$1$1) {
|
||||
Local variables:
|
||||
14 $receiver: J
|
||||
14 $this$b3: J
|
||||
16 $i$a$-block-DeepInlineWithLabelsKt$foo$1$1$1: I
|
||||
13 $i$f$block: I
|
||||
12 z: Z
|
||||
9 $receiver: J
|
||||
9 $this$b2: J
|
||||
11 $i$a$-block-DeepInlineWithLabelsKt$foo$1$1: I
|
||||
8 $i$f$block: I
|
||||
7 y: Z
|
||||
4 $receiver: J
|
||||
4 $this$b1: J
|
||||
6 $i$a$-block-DeepInlineWithLabelsKt$foo$1: I
|
||||
3 $i$f$block: I
|
||||
2 x: Z
|
||||
0 $receiver: Ljava/lang/String;
|
||||
0 $this$foo: Ljava/lang/String;
|
||||
1 count: I
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -9,10 +9,10 @@ final class DeepNoinlineWithLabels_afterKt$foo$1$1$1 : kotlin/jvm/internal/Lambd
|
||||
|
||||
public java.lang.Object invoke(java.lang.Object p0)
|
||||
|
||||
public final void invoke(long $receiver) {
|
||||
public final void invoke(long $this$b3) {
|
||||
Local variables:
|
||||
0 this: LDeepNoinlineWithLabels_afterKt$foo$1$1$1;
|
||||
1 $receiver: J
|
||||
1 $this$b3: J
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ final class DeepNoinlineWithLabels_afterKt$foo$1$1 : kotlin/jvm/internal/Lambda,
|
||||
Local variables:
|
||||
3 z: Z
|
||||
0 this: LDeepNoinlineWithLabels_afterKt$foo$1$1;
|
||||
1 $receiver: J
|
||||
1 $this$b2: J
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ final class DeepNoinlineWithLabels_afterKt$foo$1 : kotlin/jvm/internal/Lambda, k
|
||||
Local variables:
|
||||
3 y: Z
|
||||
0 this: LDeepNoinlineWithLabels_afterKt$foo$1;
|
||||
1 $receiver: J
|
||||
1 $this$b1: J
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ public final class DeepNoinlineWithLabels_afterKt : java/lang/Object {
|
||||
0 block: Lkotlin/jvm/functions/Function1;
|
||||
}
|
||||
|
||||
public final static void foo(java.lang.String x, int $receiver) {
|
||||
public final static void foo(java.lang.String x, int $this$foo) {
|
||||
Local variables:
|
||||
2 x: Z
|
||||
0 $receiver: Ljava/lang/String;
|
||||
0 $this$foo: Ljava/lang/String;
|
||||
1 count: I
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ final class DeepNoinline_afterKt$foo$1$1$1 : kotlin/jvm/internal/Lambda, kotlin/
|
||||
|
||||
public java.lang.Object invoke(java.lang.Object p0)
|
||||
|
||||
public final void invoke(long $receiver) {
|
||||
public final void invoke(long $this$block) {
|
||||
Local variables:
|
||||
0 this: LDeepNoinline_afterKt$foo$1$1$1;
|
||||
1 $receiver: J
|
||||
1 $this$block: J
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ final class DeepNoinline_afterKt$foo$1$1 : kotlin/jvm/internal/Lambda, kotlin/jv
|
||||
Local variables:
|
||||
3 z: Z
|
||||
0 this: LDeepNoinline_afterKt$foo$1$1;
|
||||
1 $receiver: J
|
||||
1 $this$block: J
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ final class DeepNoinline_afterKt$foo$1 : kotlin/jvm/internal/Lambda, kotlin/jvm/
|
||||
Local variables:
|
||||
3 y: Z
|
||||
0 this: LDeepNoinline_afterKt$foo$1;
|
||||
1 $receiver: J
|
||||
1 $this$block: J
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,10 +56,10 @@ public final class DeepNoinline_afterKt : java/lang/Object {
|
||||
0 block: Lkotlin/jvm/functions/Function1;
|
||||
}
|
||||
|
||||
public final static void foo(java.lang.String x, int $receiver) {
|
||||
public final static void foo(java.lang.String x, int $this$foo) {
|
||||
Local variables:
|
||||
2 x: Z
|
||||
0 $receiver: Ljava/lang/String;
|
||||
0 $this$foo: Ljava/lang/String;
|
||||
1 count: I
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@ public final class InlineReceiversKt : java/lang/Object {
|
||||
1 $i$f$block: I
|
||||
}
|
||||
|
||||
public final static void foo(java.lang.String $receiver, int $i$a$-block-InlineReceiversKt$foo$1) {
|
||||
public final static void foo(java.lang.String $this$block, int $i$a$-block-InlineReceiversKt$foo$1) {
|
||||
Local variables:
|
||||
4 $receiver: J
|
||||
4 $this$block: J
|
||||
6 $i$a$-block-InlineReceiversKt$foo$1: I
|
||||
3 $i$f$block: I
|
||||
2 x: Z
|
||||
0 $receiver: Ljava/lang/String;
|
||||
0 $this$foo: Ljava/lang/String;
|
||||
1 count: I
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -9,10 +9,10 @@ final class NonInlineReceivers_afterKt$foo$1 : kotlin/jvm/internal/Lambda, kotli
|
||||
|
||||
public java.lang.Object invoke(java.lang.Object p0)
|
||||
|
||||
public final void invoke(long $receiver) {
|
||||
public final void invoke(long $this$block) {
|
||||
Local variables:
|
||||
0 this: LNonInlineReceivers_afterKt$foo$1;
|
||||
1 $receiver: J
|
||||
1 $this$block: J
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ public final class NonInlineReceivers_afterKt : java/lang/Object {
|
||||
0 block: Lkotlin/jvm/functions/Function1;
|
||||
}
|
||||
|
||||
public final static void foo(java.lang.String x, int $receiver) {
|
||||
public final static void foo(java.lang.String x, int $this$foo) {
|
||||
Local variables:
|
||||
2 x: Z
|
||||
0 $receiver: Ljava/lang/String;
|
||||
0 $this$foo: Ljava/lang/String;
|
||||
1 count: I
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
public final class SimpleKt : java/lang/Object {
|
||||
public final static void foo(java.lang.String $receiver, int a)
|
||||
public final static void foo(java.lang.String $this$foo, int a)
|
||||
}
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ fun A.foo() {
|
||||
// EXPRESSION: myFun()
|
||||
// RESULT: 1: I
|
||||
frame = foo:14, FrameExtensionFunKt {frameExtensionFun}
|
||||
local = $receiver: frameExtensionFun.A = {frameExtensionFun.A@uniqueID} (sp = null)
|
||||
local = $this$foo: frameExtensionFun.A = {frameExtensionFun.A@uniqueID} (sp = null)
|
||||
field = prop: int = 1 (sp = frameExtensionFun.kt, 8)
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public final class AnnotationsTest {
|
||||
@Anno(value = "top-level-fun")
|
||||
public static final void topLevelFun(@org.jetbrains.annotations.NotNull()
|
||||
@Anno(value = "top-level-fun-receiver")
|
||||
java.lang.String $receiver) {
|
||||
java.lang.String $this$topLevelFun) {
|
||||
}
|
||||
|
||||
@Anno(value = "top-level-val")
|
||||
@@ -35,7 +35,7 @@ public final class AnnotationsTest {
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static final java.lang.String getTopLevelVal(@Anno(value = "top-level-val-receiver")
|
||||
int $receiver) {
|
||||
int $this$topLevelVal) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public final class LibKt {
|
||||
}
|
||||
|
||||
public static final int func(@org.jetbrains.annotations.NotNull()
|
||||
java.lang.String $receiver) {
|
||||
java.lang.String $this$func) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public abstract class NullableBundleProperty<EE extends java.lang.Object> implem
|
||||
private final java.lang.String key = null;
|
||||
|
||||
private final java.lang.String toKey(@org.jetbrains.annotations.NotNull()
|
||||
kotlin.reflect.KProperty<?> $receiver) {
|
||||
kotlin.reflect.KProperty<?> $this$toKey) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -304,7 +304,7 @@ public final class Test<G extends java.lang.Object> {
|
||||
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
public final <T extends java.lang.Object>java.lang.Class<java.lang.Enum<?>> f5(@org.jetbrains.annotations.NotNull()
|
||||
MyType<T> $receiver) {
|
||||
MyType<T> $this$f5) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public final class TopLevelKt {
|
||||
|
||||
public static final void extensionFunction(@org.jetbrains.annotations.NotNull()
|
||||
@Anno(value = "rec")
|
||||
java.lang.String $receiver, @org.jetbrains.annotations.NotNull()
|
||||
java.lang.String $this$extensionFunction, @org.jetbrains.annotations.NotNull()
|
||||
@Anno(value = "1")
|
||||
java.lang.String a, @org.jetbrains.annotations.NotNull()
|
||||
@Anno(value = "2")
|
||||
@@ -59,13 +59,13 @@ public final class TopLevelKt {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static final <T extends java.lang.Object>java.lang.String getExtensionProperty(@org.jetbrains.annotations.NotNull()
|
||||
@Anno(value = "propRec")
|
||||
T $receiver) {
|
||||
T $this$extensionProperty) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final <T extends java.lang.Object>void setExtensionProperty(@org.jetbrains.annotations.NotNull()
|
||||
@Anno(value = "propRec")
|
||||
T $receiver, @org.jetbrains.annotations.NotNull()
|
||||
T $this$extensionProperty, @org.jetbrains.annotations.NotNull()
|
||||
@Anno(value = "setparam")
|
||||
java.lang.String setParamName) {
|
||||
}
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@ UFile (package = )
|
||||
ULiteralExpression (value = "aaa")
|
||||
UBlockExpression
|
||||
UAnnotationMethod (name = withReceiver)
|
||||
UParameter (name = $receiver)
|
||||
UParameter (name = $this$withReceiver)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
@@ -147,7 +147,7 @@ UFile (package = )
|
||||
UAnnotationMethod (name = ParametersDisorderKt$objectLiteral$1)
|
||||
UClass (name = A)
|
||||
UAnnotationMethod (name = with2Receivers)
|
||||
UParameter (name = $receiver)
|
||||
UParameter (name = $this$with2Receivers)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
|
||||
@@ -3,7 +3,7 @@ public final class ParametersDisorderKt {
|
||||
}
|
||||
public static final fun withDefault(@org.jetbrains.annotations.NotNull c: int, @org.jetbrains.annotations.NotNull d: java.lang.String) : void {
|
||||
}
|
||||
public static final fun withReceiver(@org.jetbrains.annotations.NotNull $receiver: java.lang.String, @org.jetbrains.annotations.NotNull a: int, @org.jetbrains.annotations.NotNull b: float) : void {
|
||||
public static final fun withReceiver(@org.jetbrains.annotations.NotNull $this$withReceiver: java.lang.String, @org.jetbrains.annotations.NotNull a: int, @org.jetbrains.annotations.NotNull b: float) : void {
|
||||
}
|
||||
public static final fun call() : void {
|
||||
global(2.2, 2)
|
||||
@@ -26,7 +26,7 @@ public final class ParametersDisorderKt {
|
||||
}
|
||||
|
||||
public final class A {
|
||||
public final fun with2Receivers(@org.jetbrains.annotations.NotNull $receiver: java.lang.String, @org.jetbrains.annotations.NotNull a: int, @org.jetbrains.annotations.NotNull b: float) : void {
|
||||
public final fun with2Receivers(@org.jetbrains.annotations.NotNull $this$with2Receivers: java.lang.String, @org.jetbrains.annotations.NotNull a: int, @org.jetbrains.annotations.NotNull b: float) : void {
|
||||
}
|
||||
public fun A() = UastEmptyExpression
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
UFile (package = )
|
||||
UClass (name = ReceiverFunKt)
|
||||
UAnnotationMethod (name = foo)
|
||||
UParameter (name = $receiver)
|
||||
UParameter (name = $this$foo)
|
||||
UAnnotation (fqName = MyReceiverAnnotation)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
public final class ReceiverFunKt {
|
||||
public static final fun foo(@MyReceiverAnnotation @org.jetbrains.annotations.NotNull $receiver: java.lang.String) : int {
|
||||
public static final fun foo(@MyReceiverAnnotation @org.jetbrains.annotations.NotNull $this$foo: java.lang.String) : int {
|
||||
return this.length
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user