xref: /aosp_15_r20/external/ksp/test-utils/testData/api/recordJavaOverrides.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: RecordJavaOverridesProcessor
20 // EXPECTED:
21 // p1.B: javaSrc/p1/A.java
22 // p1.C: javaSrc/p1/B.java
23 // p1.R1: javaSrc/p1/A.java
24 // p1.R1: javaSrc/p1/C.java
25 // p1.R2: javaSrc/p1/A.java
26 // p1.R2: javaSrc/p1/C.java
27 // p1.V1: javaSrc/p1/A.java
28 // p1.V1: javaSrc/p1/C.java
29 // p1.V2: javaSrc/p1/A.java
30 // p1.V2: javaSrc/p1/C.java
31 // END
32 
33 // FILE: p1/A.java
34 package p1;
35 public class A extends B {
36     R1 f1(V1 v) {
37         return null
38     }
39 
40     R2 f2(V2 v) {
41         return null
42     }
43 }
44 
45 // FILE: p1/B.java
46 package p1;
47 public class B extends C {
48     R1 f1(V1 v) {
49         return null
50     }
51 }
52 
53 // FILE: p1/C.java
54 package p1;
55 public class C extends D {
56     R1 f1(V1 v) {
57         return null
58     }
59 
60     R2 f2(V2 v) {
61         return null
62     }
63 }
64 
65 // FILE: p1/D.kt
66 package p1;
67 
68 class V1
69 class V2
70 class R1
71 class R2
72