diff --git a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt b/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt index a5074ef1d52..2b6f82e897a 100644 --- a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt +++ b/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt @@ -44,6 +44,8 @@ class RawFirBuilder(val session: FirSession, val stubMode: Boolean) { private val implicitEnumType = FirImplicitEnumTypeRef(session, null) + private val implicitAnnotationType = FirImplicitAnnotationTypeRef(session, null) + fun buildFirFile(file: KtFile): FirFile { return file.accept(Visitor(), Unit) as FirFile } @@ -339,13 +341,18 @@ class RawFirBuilder(val session: FirSession, val stubMode: Boolean) { } } } - if (this is KtClass && this.isInterface()) return delegatedSuperTypeRef - fun isEnum() = this is KtClass && this.isEnum() - val defaultDelegatedSuperTypeRef = if (isEnum()) implicitEnumType else implicitAnyType - if (delegatedSuperTypeRef == null && this.hasPrimaryConstructor()) { + val defaultDelegatedSuperTypeRef = when { + this is KtClass && this.isEnum() -> implicitEnumType + this is KtClass && this.isAnnotation() -> implicitAnnotationType + else -> implicitAnyType + } + // TODO: for enum / annotations, it *should* be empty + if (container.superTypeRefs.isEmpty()) { container.superTypeRefs += defaultDelegatedSuperTypeRef } + if (this is KtClass && this.isInterface()) return delegatedSuperTypeRef + // TODO: in case we have no primary constructor, // it may be not possible to determine delegated super type right here delegatedSuperTypeRef = delegatedSuperTypeRef ?: defaultDelegatedSuperTypeRef diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/F.txt b/compiler/fir/psi2fir/testData/rawBuilder/declarations/F.txt index fb18e971b80..6060ee2b2de 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/declarations/F.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/declarations/F.txt @@ -3,7 +3,7 @@ FILE: F.kt public? constructor(): super() } - public? final? class B : A, kotlin/Any { + public? final? class B : A { public? constructor(): super() } diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.txt b/compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.txt index b2fb4c421f2..b8d8164b10a 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.txt @@ -8,7 +8,7 @@ FILE: complexTypes.kt } } - public? final? interface Test { + public? final? interface Test : kotlin/Any { public? final? val x: a.b.C.D, *> public? get(): a.b.C.D, *> diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.txt b/compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.txt index 95f7d83408d..cfb0af99105 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.txt @@ -1,11 +1,11 @@ FILE: enums2.kt - public? final? interface Some { + public? final? interface Some : kotlin/Any { } - public? final? object O1 : Some, kotlin/Any { + public? final? object O1 : Some { public? constructor(): super() } - public? final? object O2 : Some, kotlin/Any { + public? final? object O2 : Some { public? constructor(): super() } diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.txt b/compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.txt index c9759d9c751..72dc76ad690 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.txt @@ -1,5 +1,5 @@ FILE: genericFunctions.kt - public? final? interface Any { + public? final? interface Any : kotlin/Any { } public? final? inline fun Any.safeAs(): T? { ^safeAs (this# as? T) diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.txt b/compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.txt index cff58d19951..259fdb3bd6f 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.txt @@ -1,5 +1,5 @@ FILE: noPrimaryConstructor.kt - public? final? class NoPrimary { + public? final? class NoPrimary : kotlin/Any { public? final? val x: String public? get(): String diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.txt b/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.txt index 68bd75e31d7..e20d5b000ce 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.txt @@ -1,12 +1,12 @@ FILE: simpleClass.kt - public? final? interface SomeInterface { + public? final? interface SomeInterface : kotlin/Any { public? final? fun foo(x: Int, y: String): String public? final? val bar: Boolean public? get(): Boolean } - public? final? class SomeClass : SomeInterface, kotlin/Any { + public? final? class SomeClass : SomeInterface { public? constructor(): super() private final? val baz: = Int(42) diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.txt b/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.txt index 8b6919c2d2c..b3cc7d02203 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.txt @@ -1,8 +1,8 @@ FILE: simpleTypeAlias.kt - public? final? interface B { + public? final? interface B : kotlin/Any { } public? final typealias C = B - public? final? class D : C, kotlin/Any { + public? final? class D : C { public? constructor(): super() } diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.txt b/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.txt index 03ee784a244..2a66aef753f 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.txt @@ -3,10 +3,10 @@ FILE: typeAliasWithGeneric.kt public? constructor(): super() } - public? final? interface B { + public? final? interface B : kotlin/Any { } public? final typealias C = B - public? final? class D : C, kotlin/Any { + public? final? class D : C { public? constructor(): super() } diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.txt b/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.txt index b9b76ae8e74..bed3dd103e5 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.txt @@ -1,5 +1,5 @@ FILE: typeParameterVsNested.kt - public? final? interface Some { + public? final? interface Some : kotlin/Any { } public? abstract class My : kotlin/Any { public? constructor(): super() diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.txt b/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.txt index e9fa7c750cd..4a41593ff9b 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.txt @@ -1,5 +1,5 @@ FILE: typeParameters.kt - public? final? interface List { + public? final? interface List : kotlin/Any { public? final? operator fun get(index: Int): T public? final? infix fun concat(other: List): List @@ -7,7 +7,7 @@ FILE: typeParameters.kt } public? final typealias StringList = List public? final typealias AnyList = List<*> - public? abstract class AbstractList : List, kotlin/Any { + public? abstract class AbstractList : List { public? constructor(): super() } diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/where.txt b/compiler/fir/psi2fir/testData/rawBuilder/declarations/where.txt index 83a7361e547..0ec54f03c62 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/declarations/where.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/declarations/where.txt @@ -1,7 +1,7 @@ FILE: where.kt - public? final? interface A { + public? final? interface A : kotlin/Any { } - public? final? interface B { + public? final? interface B : kotlin/Any { } public? final? class C : kotlin/Any { public? constructor(): super() diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/annotated.txt b/compiler/fir/psi2fir/testData/rawBuilder/expressions/annotated.txt index 9b9f5f3b3e1..912af844741 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/expressions/annotated.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/expressions/annotated.txt @@ -1,6 +1,6 @@ FILE: annotated.kt - @Target(AnnotationTarget#.EXPRESSION#) @Retention(AnnotationRetention#.SOURCE#) public? final? annotation class Ann : kotlin/Any { - public? constructor(): super() + @Target(AnnotationTarget#.EXPRESSION#) @Retention(AnnotationRetention#.SOURCE#) public? final? annotation class Ann : kotlin/Annotation { + public? constructor(): super() } public? final? fun foo(arg: Int): Int { diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.txt b/compiler/fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.txt index c9f56b8d8ee..ae94d68d7ff 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.txt @@ -1,20 +1,20 @@ FILE: collectionLiterals.kt - public? final? annotation class Ann1 : kotlin/Any { - public? constructor(arr: IntArray): super() + public? final? annotation class Ann1 : kotlin/Annotation { + public? constructor(arr: IntArray): super() public? final? val arr: IntArray = R|/arr| public? get(): IntArray } - public? final? annotation class Ann2 : kotlin/Any { - public? constructor(arr: DoubleArray): super() + public? final? annotation class Ann2 : kotlin/Annotation { + public? constructor(arr: DoubleArray): super() public? final? val arr: DoubleArray = R|/arr| public? get(): DoubleArray } - public? final? annotation class Ann3 : kotlin/Any { - public? constructor(arr: Array): super() + public? final? annotation class Ann3 : kotlin/Annotation { + public? constructor(arr: Array): super() public? final? val arr: Array = R|/arr| public? get(): Array diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/super.txt b/compiler/fir/psi2fir/testData/rawBuilder/expressions/super.txt index cd9bc693545..a21f99e4220 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/expressions/super.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/expressions/super.txt @@ -1,10 +1,10 @@ FILE: super.kt - public? final? interface A { + public? final? interface A : kotlin/Any { public? final? fun foo(): kotlin/Unit { } } - public? final? interface B { + public? final? interface B : kotlin/Any { public? final? fun foo(): kotlin/Unit { } @@ -12,7 +12,7 @@ FILE: super.kt } } - public? final? class C : A, B, kotlin/Any { + public? final? class C : A, B { public? constructor(): super() public? open? override fun bar(): kotlin/Unit { diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/typeOperators.txt b/compiler/fir/psi2fir/testData/rawBuilder/expressions/typeOperators.txt index 1019d3686a7..230b76df5fe 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/expressions/typeOperators.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/expressions/typeOperators.txt @@ -1,5 +1,5 @@ FILE: typeOperators.kt - public? final? interface IThing { + public? final? interface IThing : kotlin/Any { } public? final? fun test1(x: Any): { ^test1 (x# is IThing) diff --git a/compiler/fir/resolve/testData/resolve/builtins/lists.txt b/compiler/fir/resolve/testData/resolve/builtins/lists.txt index 2dcc4adec6c..62ef3892704 100644 --- a/compiler/fir/resolve/testData/resolve/builtins/lists.txt +++ b/compiler/fir/resolve/testData/resolve/builtins/lists.txt @@ -1,9 +1,9 @@ FILE: lists.kt - public abstract class MyStringList : R|kotlin/collections/List|, R|kotlin/Any| { + public abstract class MyStringList : R|kotlin/collections/List| { public constructor(): super() } - public abstract class MyMutableStringList : R|kotlin/collections/MutableList|, R|kotlin/Any| { + public abstract class MyMutableStringList : R|kotlin/collections/MutableList| { public constructor(): super() } diff --git a/compiler/fir/resolve/testData/resolve/enum.txt b/compiler/fir/resolve/testData/resolve/enum.txt index d5c2ddcca1c..b0f10aed59e 100644 --- a/compiler/fir/resolve/testData/resolve/enum.txt +++ b/compiler/fir/resolve/testData/resolve/enum.txt @@ -1,11 +1,11 @@ FILE: enum.kt - public abstract interface Some { + public abstract interface Some : R|kotlin/Any| { } - public final object O1 : R|Some|, R|kotlin/Any| { + public final object O1 : R|Some| { public constructor(): super() } - public final object O2 : R|Some|, R|kotlin/Any| { + public final object O2 : R|Some| { public constructor(): super() } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/dispatchReceiver.txt b/compiler/fir/resolve/testData/resolve/expresssions/dispatchReceiver.txt index a624352a4d2..0d5227d4c5d 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/dispatchReceiver.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/dispatchReceiver.txt @@ -1,5 +1,5 @@ FILE: dispatchReceiver.kt - public abstract interface Base { + public abstract interface Base : R|kotlin/Any| { public abstract fun check(): R|kotlin/Unit| } diff --git a/compiler/fir/resolve/testData/resolve/fromBuilder/complexTypes.txt b/compiler/fir/resolve/testData/resolve/fromBuilder/complexTypes.txt index cc5982f2572..8d4f9da1dfe 100644 --- a/compiler/fir/resolve/testData/resolve/fromBuilder/complexTypes.txt +++ b/compiler/fir/resolve/testData/resolve/fromBuilder/complexTypes.txt @@ -8,7 +8,7 @@ FILE: complexTypes.kt } } - public abstract interface Test { + public abstract interface Test : R|kotlin/Any| { public abstract val x: R|a/b/C.D, *>| public get(): R|a/b/C.D, *>| diff --git a/compiler/fir/resolve/testData/resolve/fromBuilder/noPrimaryConstructor.txt b/compiler/fir/resolve/testData/resolve/fromBuilder/noPrimaryConstructor.txt index a08e0adf8ae..0f1cfa484ff 100644 --- a/compiler/fir/resolve/testData/resolve/fromBuilder/noPrimaryConstructor.txt +++ b/compiler/fir/resolve/testData/resolve/fromBuilder/noPrimaryConstructor.txt @@ -1,5 +1,5 @@ FILE: noPrimaryConstructor.kt - public final class NoPrimary { + public final class NoPrimary : R|kotlin/Any| { public final val x: R|kotlin/String| public get(): R|kotlin/String| diff --git a/compiler/fir/resolve/testData/resolve/fromBuilder/simpleClass.txt b/compiler/fir/resolve/testData/resolve/fromBuilder/simpleClass.txt index 257ecceaf7c..f7ff2d92b9d 100644 --- a/compiler/fir/resolve/testData/resolve/fromBuilder/simpleClass.txt +++ b/compiler/fir/resolve/testData/resolve/fromBuilder/simpleClass.txt @@ -1,12 +1,12 @@ FILE: simpleClass.kt - public abstract interface SomeInterface { + public abstract interface SomeInterface : R|kotlin/Any| { public abstract fun foo(x: R|kotlin/Int|, y: R|kotlin/String|): R|kotlin/String| public abstract val bar: R|kotlin/Boolean| public get(): R|kotlin/Boolean| } - public final class SomeClass : R|SomeInterface|, R|kotlin/Any| { + public final class SomeClass : R|SomeInterface| { public constructor(): super() private final val baz: R|kotlin/Int| = Int(42) diff --git a/compiler/fir/resolve/testData/resolve/fromBuilder/typeParameters.txt b/compiler/fir/resolve/testData/resolve/fromBuilder/typeParameters.txt index e3f821384b5..9c68ce8e2fc 100644 --- a/compiler/fir/resolve/testData/resolve/fromBuilder/typeParameters.txt +++ b/compiler/fir/resolve/testData/resolve/fromBuilder/typeParameters.txt @@ -1,5 +1,5 @@ FILE: typeParameters.kt - public abstract interface List { + public abstract interface List : R|kotlin/Any| { public abstract operator fun get(index: R|kotlin/Int|): R|T| public abstract infix fun concat(other: R|List|): R|List| @@ -7,7 +7,7 @@ FILE: typeParameters.kt } public final typealias StringList = R|List| public final typealias AnyList = R|List<*>| - public abstract class AbstractList : R|List|, R|kotlin/Any| { + public abstract class AbstractList : R|List| { public constructor(): super() } diff --git a/compiler/fir/resolve/testData/resolve/functionTypes.txt b/compiler/fir/resolve/testData/resolve/functionTypes.txt index 079f101eee2..35e8531b458 100644 --- a/compiler/fir/resolve/testData/resolve/functionTypes.txt +++ b/compiler/fir/resolve/testData/resolve/functionTypes.txt @@ -11,7 +11,7 @@ FILE: functionTypes.kt } public abstract interface KProperty1 : R|KProperty|, R|kotlin/Function1| { } - public abstract interface KProperty { + public abstract interface KProperty : R|kotlin/Any| { } - public abstract interface KMutableProperty { + public abstract interface KMutableProperty : R|kotlin/Any| { } diff --git a/compiler/fir/resolve/testData/resolve/genericFunctions.txt b/compiler/fir/resolve/testData/resolve/genericFunctions.txt index da21d8e56a0..baf1eac84ca 100644 --- a/compiler/fir/resolve/testData/resolve/genericFunctions.txt +++ b/compiler/fir/resolve/testData/resolve/genericFunctions.txt @@ -1,5 +1,5 @@ FILE: genericFunctions.kt - public abstract interface Any { + public abstract interface Any : R|kotlin/Any| { } public final inline fun R|Any|.safeAs(): R|T|? { ^safeAs (this# as? R|T|) diff --git a/compiler/fir/resolve/testData/resolve/multifile/ByteArray.txt b/compiler/fir/resolve/testData/resolve/multifile/ByteArray.txt index 0399097c945..3a6202cb7dd 100644 --- a/compiler/fir/resolve/testData/resolve/multifile/ByteArray.txt +++ b/compiler/fir/resolve/testData/resolve/multifile/ByteArray.txt @@ -1,5 +1,5 @@ FILE: ByteArray.kt - public abstract interface My { + public abstract interface My : R|kotlin/Any| { public abstract val array: R|kotlin/ByteArray| public get(): R|kotlin/ByteArray| diff --git a/compiler/fir/resolve/testData/resolve/overrides/three.txt b/compiler/fir/resolve/testData/resolve/overrides/three.txt index 25f3d667254..ab9a150102b 100644 --- a/compiler/fir/resolve/testData/resolve/overrides/three.txt +++ b/compiler/fir/resolve/testData/resolve/overrides/three.txt @@ -6,7 +6,7 @@ FILE: three.kt } } - public abstract interface Y { + public abstract interface Y : R|kotlin/Any| { public open fun baz(): R|kotlin/Unit| { } diff --git a/compiler/fir/resolve/testData/resolve/simpleClass.txt b/compiler/fir/resolve/testData/resolve/simpleClass.txt index 92659f586b9..a361eb9627d 100644 --- a/compiler/fir/resolve/testData/resolve/simpleClass.txt +++ b/compiler/fir/resolve/testData/resolve/simpleClass.txt @@ -1,12 +1,12 @@ FILE: simpleClass.kt - public abstract interface SomeInterface { + public abstract interface SomeInterface : R|kotlin/Any| { public abstract fun foo(x: R|kotlin/Int|, y: R|kotlin/String|): R|kotlin/String| public abstract val bar: R|kotlin/Boolean| public get(): R|kotlin/Boolean| } - public final class SomeClass : R|SomeInterface|, R|kotlin/Any| { + public final class SomeClass : R|SomeInterface| { public constructor(): super() private final val baz: R|kotlin/Int| = Int(42) diff --git a/compiler/fir/resolve/testData/resolve/simpleTypeAlias.txt b/compiler/fir/resolve/testData/resolve/simpleTypeAlias.txt index 29746690c6a..011cdba3bdd 100644 --- a/compiler/fir/resolve/testData/resolve/simpleTypeAlias.txt +++ b/compiler/fir/resolve/testData/resolve/simpleTypeAlias.txt @@ -1,8 +1,8 @@ FILE: simpleTypeAlias.kt - public abstract interface B { + public abstract interface B : R|kotlin/Any| { } public final typealias C = R|B| - public final class D : R|C|, R|kotlin/Any| { + public final class D : R|C| { public constructor(): super() } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/functionX.txt b/compiler/fir/resolve/testData/resolve/stdlib/functionX.txt index 759ef27b153..43ddafa7a0c 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/functionX.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/functionX.txt @@ -15,7 +15,7 @@ FILE: functionX.kt } public get(): R|kotlin/Function1| - public final class MyFunction : R|kotlin/Function2|, R|kotlin/Any| { + public final class MyFunction : R|kotlin/Function2| { public constructor(): super() public final override fun invoke(p1: R|kotlin/Int|, p2: R|kotlin/String|): R|kotlin/Unit| { diff --git a/compiler/fir/resolve/testData/resolve/typeAliasWithGeneric.txt b/compiler/fir/resolve/testData/resolve/typeAliasWithGeneric.txt index 5a9d93c4795..1a72dfdb71d 100644 --- a/compiler/fir/resolve/testData/resolve/typeAliasWithGeneric.txt +++ b/compiler/fir/resolve/testData/resolve/typeAliasWithGeneric.txt @@ -3,9 +3,9 @@ FILE: typeAliasWithGeneric.kt public constructor(): super() } - public abstract interface B { + public abstract interface B : R|kotlin/Any| { } - public final class D : R|C|, R|kotlin/Any| { + public final class D : R|C| { public constructor(): super() } diff --git a/compiler/fir/resolve/testData/resolve/typeParameterVsNested.txt b/compiler/fir/resolve/testData/resolve/typeParameterVsNested.txt index 028f4dd3647..69917bc0dc5 100644 --- a/compiler/fir/resolve/testData/resolve/typeParameterVsNested.txt +++ b/compiler/fir/resolve/testData/resolve/typeParameterVsNested.txt @@ -1,5 +1,5 @@ FILE: typeParameterVsNested.kt - public abstract interface Some { + public abstract interface Some : R|kotlin/Any| { } public abstract class My : R|kotlin/Any| { public constructor(): super() diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/impl/FirImplicitBuiltinTypeRef.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/impl/FirImplicitBuiltinTypeRef.kt index 6473e4eacc3..7b418790193 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/impl/FirImplicitBuiltinTypeRef.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/impl/FirImplicitBuiltinTypeRef.kt @@ -38,4 +38,9 @@ class FirImplicitAnyTypeRef( class FirImplicitEnumTypeRef( session: FirSession, psi: PsiElement? -) : FirImplicitBuiltinTypeRef(session, psi, KotlinBuiltIns.FQ_NAMES._enum) \ No newline at end of file +) : FirImplicitBuiltinTypeRef(session, psi, KotlinBuiltIns.FQ_NAMES._enum) + +class FirImplicitAnnotationTypeRef( + session: FirSession, + psi: PsiElement? +) : FirImplicitBuiltinTypeRef(session, psi, KotlinBuiltIns.FQ_NAMES.annotation.toUnsafe()) \ No newline at end of file diff --git a/idea/testData/fir/multiModule/javaInheritsKotlinExtension/jvm/Base.txt b/idea/testData/fir/multiModule/javaInheritsKotlinExtension/jvm/Base.txt index 9eb2b8bf79e..35d8d9b6b17 100644 --- a/idea/testData/fir/multiModule/javaInheritsKotlinExtension/jvm/Base.txt +++ b/idea/testData/fir/multiModule/javaInheritsKotlinExtension/jvm/Base.txt @@ -1,5 +1,5 @@ FILE: Base.kt - public abstract interface First { + public abstract interface First : R|kotlin/Any| { } public open class Second : R|kotlin/Any| { public constructor(): super() diff --git a/idea/testData/fir/multiModule/javaInheritsRawKotlin/jvm/Strange.txt b/idea/testData/fir/multiModule/javaInheritsRawKotlin/jvm/Strange.txt index 0f4bf3dfedf..edefa2141a4 100644 --- a/idea/testData/fir/multiModule/javaInheritsRawKotlin/jvm/Strange.txt +++ b/idea/testData/fir/multiModule/javaInheritsRawKotlin/jvm/Strange.txt @@ -1,5 +1,5 @@ FILE: Strange.kt - public abstract interface Strange { + public abstract interface Strange : R|kotlin/Any| { public abstract fun foo(): R|T| } diff --git a/idea/testData/fir/multiModule/mppSuperTypes/jvm/jvm.txt b/idea/testData/fir/multiModule/mppSuperTypes/jvm/jvm.txt index 2cda378993b..3a9ca6ec2ba 100644 --- a/idea/testData/fir/multiModule/mppSuperTypes/jvm/jvm.txt +++ b/idea/testData/fir/multiModule/mppSuperTypes/jvm/jvm.txt @@ -6,7 +6,7 @@ FILE: jvm.kt } } - public abstract interface Y { + public abstract interface Y : R|kotlin/Any| { public open fun baz(): R|kotlin/Unit| { }