xref: /aosp_15_r20/external/ksp/test-utils/testData/api/recordJavaGetAllMembers.kt (revision af87fb4bb8e3042070d2a054e912924f599b22b7)
1 /*
2  * Copyright 2020 Google LLC
3  * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 // WITH_RUNTIME
19 // TEST PROCESSOR: RecordJavaGetAllMembersProcessor
20 // EXPECTED:
21 // p1.C: javaSrc/p1/B.java
22 // p1.D: javaSrc/p1/C.java
23 // p1.R2: javaSrc/p1/B.java
24 // p1.R3: javaSrc/p1/C.java
25 // p1.V2: javaSrc/p1/B.java
26 // p1.V3: javaSrc/p1/C.java
27 // END
28 
29 // FILE: p1/A.kt
30 package p1;
31 class A : B {
f1null32     fun f1(): R1
33     val v1: V1 = TODO()
34 }
35 
36 // FILE: p1/B.java
37 package p1;
38 public class B extends C {
39     R2 f2() { return null }
40     V2 v2 = null;
41 }
42 
43 // FILE: p1/C.java
44 package p1;
45 public class C extends D {
46     R3 f3() { return null }
47     V3 v3 = null;
48 }
49 
50 // FILE: p1/D.kt
51 package p1;
52 
53 class D {
f4null54     fun f4(): R4
55     val v4: V4 = TODO()
56 }
57 
58 class R1
59 class R2
60 class R3
61 class R4
62 class V1
63 class V2
64 class V3
65 class V4
66