forked from google/ksp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
superTypes.kt
112 lines (98 loc) · 4.95 KB
/
superTypes.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
* Copyright 2020 Google LLC
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// WITH_RUNTIME
// TEST PROCESSOR: SuperTypesProcessor
// EXPECTED:
// KotlinInterfaceInLib: kotlin.Any
// KotlinInterfaceInLibWithSuper: KotlinInterfaceInLib
// AbstractKotlinClassInLib: kotlin.Any
// AbstractKotlinClassInLibWithSuperClass: AbstractKotlinClassInLib
// AbstractKotlinClassInLibWithSuperInterface: KotlinInterfaceInLib
// KotlinClassInLib: kotlin.Any
// KotlinClassInLibWithSuperAbstract: AbstractKotlinClassInLib
// KotlinClassInLibWithSuperClass: KotlinClassInLib
// KotlinClassInLibWithSuperInterface: KotlinInterfaceInLib
// JavaInterfaceInLib: kotlin.Any
// JavaInterfaceInLibWithSuper: JavaInterfaceInLib
// AbstractJavaClassInLib: kotlin.Any
// AbstractJavaClassInLibWithSuperInterface: JavaInterfaceInLib
// AbstractJavaClassInLibWithSuperClass: AbstractJavaClassInLib
// JavaClassInLib: kotlin.Any
// JavaClassInLibWithSuperInterface: JavaInterfaceInLib
// JavaClassInLibWithSuperAbstract: AbstractJavaClassInLib
// JavaClassInLibWithSuperClass: JavaClassInLib
// KotlinInterfaceInSource: kotlin.Any
// KotlinInterfaceInSourceWithSuper: KotlinInterfaceInSource
// AbstractKotlinClassInSource: kotlin.Any
// AbstractKotlinClassInSourceWithSuperClass: AbstractKotlinClassInSource
// AbstractKotlinClassInSourceWithSuperInterface: KotlinInterfaceInSource
// KotlinClassInSource: kotlin.Any
// KotlinClassInSourceWithSuperAbstract: AbstractKotlinClassInSource
// KotlinClassInSourceWithSuperClass: KotlinClassInSource
// KotlinClassInSourceWithSuperInterface: KotlinInterfaceInSource
// JavaInterfaceInSource: kotlin.Any
// JavaInterfaceInSourceWithSuper: JavaInterfaceInSource
// AbstractJavaClassInSource: kotlin.Any
// AbstractJavaClassInSourceWithSuperInterface: JavaInterfaceInSource
// AbstractJavaClassInSourceWithSuperClass: AbstractJavaClassInSource
// JavaClassInSource: kotlin.Any
// JavaClassInSourceWithSuperInterface: JavaInterfaceInSource
// JavaClassInSourceWithSuperAbstract: AbstractJavaClassInSource
// JavaClassInSourceWithSuperClass: JavaClassInSource
// END
// MODULE: lib
// FILE: KotlinLib.kt
interface KotlinInterfaceInLib
interface KotlinInterfaceInLibWithSuper : KotlinInterfaceInLib
abstract class AbstractKotlinClassInLib
abstract class AbstractKotlinClassInLibWithSuperClass : AbstractKotlinClassInLib()
abstract class AbstractKotlinClassInLibWithSuperInterface : KotlinInterfaceInLib
open class KotlinClassInLib
open class KotlinClassInLibWithSuperAbstract : AbstractKotlinClassInLib()
open class KotlinClassInLibWithSuperClass : KotlinClassInLib()
open class KotlinClassInLibWithSuperInterface : KotlinInterfaceInLib
// FILE: JavaLib.java
interface JavaInterfaceInLib {}
interface JavaInterfaceInLibWithSuper extends JavaInterfaceInLib {}
abstract class AbstractJavaClassInLib {}
abstract class AbstractJavaClassInLibWithSuperInterface implements JavaInterfaceInLib {}
abstract class AbstractJavaClassInLibWithSuperClass extends AbstractJavaClassInLib {}
class JavaClassInLib {}
class JavaClassInLibWithSuperInterface implements JavaInterfaceInLib {}
class JavaClassInLibWithSuperAbstract extends AbstractJavaClassInLib {}
class JavaClassInLibWithSuperClass extends JavaClassInLib {}
// MODULE: main(lib)
// FILE: KotlinSource.kt
interface KotlinInterfaceInSource
interface KotlinInterfaceInSourceWithSuper : KotlinInterfaceInSource
abstract class AbstractKotlinClassInSource
abstract class AbstractKotlinClassInSourceWithSuperClass : AbstractKotlinClassInSource()
abstract class AbstractKotlinClassInSourceWithSuperInterface : KotlinInterfaceInSource
open class KotlinClassInSource
open class KotlinClassInSourceWithSuperAbstract : AbstractKotlinClassInSource()
open class KotlinClassInSourceWithSuperClass : KotlinClassInSource()
open class KotlinClassInSourceWithSuperInterface : KotlinInterfaceInSource
// FILE: JavaSource.java
interface JavaInterfaceInSource {}
interface JavaInterfaceInSourceWithSuper extends JavaInterfaceInSource {}
abstract class AbstractJavaClassInSource {}
abstract class AbstractJavaClassInSourceWithSuperInterface implements JavaInterfaceInSource {}
abstract class AbstractJavaClassInSourceWithSuperClass extends AbstractJavaClassInSource {}
class JavaClassInSource {}
class JavaClassInSourceWithSuperInterface implements JavaInterfaceInSource {}
class JavaClassInSourceWithSuperAbstract extends AbstractJavaClassInSource {}
class JavaClassInSourceWithSuperClass extends JavaClassInSource {}