Deserialize receiver parameter annotations for extension functions
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
package test
|
||||
|
||||
target(AnnotationTarget.VALUE_PARAMETER)
|
||||
annotation class Ann
|
||||
|
||||
class A {
|
||||
|
||||
@receiver:Ann
|
||||
fun String.myLength(@Ann q:String): Int {
|
||||
return length()
|
||||
}
|
||||
|
||||
@receiver:Ann
|
||||
val String.myLength2: Int
|
||||
get() = length()
|
||||
|
||||
@receiver:Ann
|
||||
var String.myLength3: Int
|
||||
get() = length()
|
||||
set(v) {}
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package test
|
||||
|
||||
internal final class A {
|
||||
/*primary*/ public constructor A()
|
||||
@receiver:test.Ann() internal final val kotlin.String.myLength2: kotlin.Int
|
||||
internal final fun kotlin.String.<get-myLength2>(): kotlin.Int
|
||||
@receiver:test.Ann() internal final var kotlin.String.myLength3: kotlin.Int
|
||||
internal final fun kotlin.String.<get-myLength3>(): kotlin.Int
|
||||
internal final fun kotlin.String.<set-myLength3>(/*0*/ v: kotlin.Int): kotlin.Unit
|
||||
@receiver:test.Ann() internal final fun kotlin.String.myLength(/*0*/ test.Ann() q: kotlin.String): kotlin.Int
|
||||
}
|
||||
|
||||
kotlin.annotation.target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.annotation() internal final class Ann : kotlin.Annotation {
|
||||
/*primary*/ public constructor Ann()
|
||||
}
|
||||
@@ -2361,6 +2361,21 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
||||
doTestCompiledKotlin(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class WithUseSiteTarget extends AbstractLoadJavaTest {
|
||||
public void testAllFilesPresentInWithUseSiteTarget() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("ReceiverTarget.kt")
|
||||
public void testReceiverTarget() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt");
|
||||
doTestCompiledKotlin(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledKotlin/class")
|
||||
|
||||
+15
@@ -470,6 +470,21 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class WithUseSiteTarget extends AbstractJvmRuntimeDescriptorLoaderTest {
|
||||
public void testAllFilesPresentInWithUseSiteTarget() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("ReceiverTarget.kt")
|
||||
public void testReceiverTarget() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledKotlin/class")
|
||||
|
||||
Reference in New Issue
Block a user