Introduce error for SUPER_CALL_FROM_PUBLIC_INLINE
^KT-45378 Fixed
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class SomeContainer {
|
||||
protected class Limit
|
||||
|
||||
protected fun makeLimit(): Limit = TODO()
|
||||
|
||||
public inline fun foo(f: () -> Unit) {
|
||||
<!PROTECTED_CONSTRUCTOR_CALL_FROM_PUBLIC_INLINE!>Limit<!>()
|
||||
<!PROTECTED_CALL_FROM_PUBLIC_INLINE_ERROR!>makeLimit<!>()
|
||||
}
|
||||
}
|
||||
|
||||
open class A protected constructor() {
|
||||
inline fun foo(f: () -> Unit) {
|
||||
<!PROTECTED_CONSTRUCTOR_CALL_FROM_PUBLIC_INLINE!>A<!>()
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class SomeContainer {
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
open class A {
|
||||
open fun test() = "OK"
|
||||
}
|
||||
|
||||
object X : A() {
|
||||
override fun test(): String {
|
||||
return "fail"
|
||||
}
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline<!> fun doTest(): String {
|
||||
return <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<!>.test()
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return X.doTest()
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
open class A {
|
||||
open fun test() = "OK"
|
||||
}
|
||||
|
||||
object X : A() {
|
||||
override fun test(): String {
|
||||
return "fail"
|
||||
}
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline<!> fun doTest(): String {
|
||||
return <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super.test()<!>
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return X.doTest()
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package
|
||||
|
||||
public fun box(): kotlin.String
|
||||
|
||||
package test {
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open fun test(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object X : test.A {
|
||||
private constructor X()
|
||||
public final inline fun doTest(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ fun test(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
@@ -7,21 +7,21 @@ open class AndroidTargetConfigurator :
|
||||
AndroidModuleConfigurator {
|
||||
|
||||
public inline fun inlineFun(): String {
|
||||
return <!SUPER_CALL_FROM_PUBLIC_INLINE!>super.classFun()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<ModuleConfiguratorWithTests>.getConfiguratorSettings()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<AndroidModuleConfigurator>.getConfiguratorSettings()<!>
|
||||
return <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super.classFun()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super<ModuleConfiguratorWithTests>.getConfiguratorSettings()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super<AndroidModuleConfigurator>.getConfiguratorSettings()<!>
|
||||
}
|
||||
|
||||
@PublishedApi
|
||||
internal inline fun inlineFunPublished(): String {
|
||||
return <!SUPER_CALL_FROM_PUBLIC_INLINE!>super.classFun()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<ModuleConfiguratorWithTests>.getConfiguratorSettings()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<AndroidModuleConfigurator>.getConfiguratorSettings()<!>
|
||||
return <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super.classFun()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super<ModuleConfiguratorWithTests>.getConfiguratorSettings()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super<AndroidModuleConfigurator>.getConfiguratorSettings()<!>
|
||||
}
|
||||
|
||||
public inline fun inlineFunAnonymousObjects(): String {
|
||||
{
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE!>super.classFun()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<ModuleConfiguratorWithTests>.getConfiguratorSettings()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<AndroidModuleConfigurator>.getConfiguratorSettings()<!>
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super.classFun()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super<ModuleConfiguratorWithTests>.getConfiguratorSettings()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super<AndroidModuleConfigurator>.getConfiguratorSettings()<!>
|
||||
}()
|
||||
|
||||
return object {
|
||||
fun run() = <!SUPER_CALL_FROM_PUBLIC_INLINE!>super@AndroidTargetConfigurator.classFun()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<ModuleConfiguratorWithTests>@AndroidTargetConfigurator.getConfiguratorSettings()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<AndroidModuleConfigurator>@AndroidTargetConfigurator.getConfiguratorSettings()<!>
|
||||
fun run() = <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super@AndroidTargetConfigurator.classFun()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super<ModuleConfiguratorWithTests>@AndroidTargetConfigurator.getConfiguratorSettings()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super<AndroidModuleConfigurator>@AndroidTargetConfigurator.getConfiguratorSettings()<!>
|
||||
}.run()
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ sealed class FooSealed : Base() {
|
||||
class B: FooSealed()
|
||||
|
||||
inline fun test() {
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE!>super.classFun()<!>
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super.classFun()<!>
|
||||
}
|
||||
|
||||
}
|
||||
@@ -103,7 +103,7 @@ enum class FooEmum {
|
||||
A, B {
|
||||
|
||||
inline fun test() {
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE!>super.classFun()<!>
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super.classFun()<!>
|
||||
}
|
||||
};
|
||||
|
||||
@@ -114,8 +114,8 @@ class FooOuter : Base() {
|
||||
|
||||
inner class FooInner: Base() {
|
||||
inline fun test() {
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE!>super@FooOuter.classFun()<!>
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE!>super.classFun()<!>
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super@FooOuter.classFun()<!>
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super.classFun()<!>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
// !LANGUAGE: -ProhibitSuperCallsFromPublicInline
|
||||
// !DIAGNOSTICS: -EXPOSED_PARAMETER_TYPE -NOTHING_TO_INLINE
|
||||
|
||||
// FILE: main.kt
|
||||
open class AndroidTargetConfigurator :
|
||||
Base(),
|
||||
ModuleConfiguratorWithTests,
|
||||
AndroidModuleConfigurator {
|
||||
|
||||
public inline fun inlineFun(): String {
|
||||
return <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<!>.classFun() + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<ModuleConfiguratorWithTests><!>.getConfiguratorSettings() + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<AndroidModuleConfigurator><!>.getConfiguratorSettings()
|
||||
}
|
||||
|
||||
@PublishedApi
|
||||
internal inline fun inlineFunPublished(): String {
|
||||
return super.classFun() + super<ModuleConfiguratorWithTests>.getConfiguratorSettings() + super<AndroidModuleConfigurator>.getConfiguratorSettings()
|
||||
}
|
||||
|
||||
public inline fun inlineFunAnonymousObjects(): String {
|
||||
{
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE!>super<!>.classFun() + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<ModuleConfiguratorWithTests><!>.getConfiguratorSettings() + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<AndroidModuleConfigurator><!>.getConfiguratorSettings()
|
||||
}()
|
||||
|
||||
return object {
|
||||
fun run() = <!SUPER_CALL_FROM_PUBLIC_INLINE!>super@AndroidTargetConfigurator<!>.classFun() + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<ModuleConfiguratorWithTests>@AndroidTargetConfigurator<!>.getConfiguratorSettings() + <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<AndroidModuleConfigurator>@AndroidTargetConfigurator<!>.getConfiguratorSettings()
|
||||
}.run()
|
||||
}
|
||||
|
||||
public inline fun inlineFunAnonymousNoDiagnostics(): String {
|
||||
return object: AndroidTargetConfigurator(), ModuleConfiguratorWithTests, AndroidModuleConfigurator {
|
||||
|
||||
override fun getConfiguratorSettings(): String {
|
||||
return super<AndroidTargetConfigurator>.getConfiguratorSettings()
|
||||
}
|
||||
|
||||
inline fun anonymousInline() {
|
||||
super.classFun() + super<<!QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE!>ModuleConfiguratorWithTests<!>>.getConfiguratorSettings() + super<<!QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE!>AndroidModuleConfigurator<!>>.getConfiguratorSettings()
|
||||
}
|
||||
|
||||
fun run() = super.classFun() + super<<!QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE!>ModuleConfiguratorWithTests<!>>.getConfiguratorSettings() + super<<!QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE!>AndroidModuleConfigurator<!>>.getConfiguratorSettings()
|
||||
}.run()
|
||||
}
|
||||
|
||||
|
||||
|
||||
internal inline fun inlineInternal(): String {
|
||||
return super.classFun() + super<ModuleConfiguratorWithTests>.getConfiguratorSettings() + super<AndroidModuleConfigurator>.getConfiguratorSettings()
|
||||
}
|
||||
|
||||
private inline fun inlinePrivate(): String {
|
||||
return super.classFun() + super<ModuleConfiguratorWithTests>.getConfiguratorSettings() + super<AndroidModuleConfigurator>.getConfiguratorSettings()
|
||||
}
|
||||
|
||||
|
||||
//non-inline
|
||||
override fun getConfiguratorSettings() =
|
||||
super.classFun() + super<ModuleConfiguratorWithTests>.getConfiguratorSettings() + super<AndroidModuleConfigurator>.getConfiguratorSettings()
|
||||
|
||||
fun noInline() {
|
||||
{
|
||||
super.classFun() + super<ModuleConfiguratorWithTests>.getConfiguratorSettings() + super<AndroidModuleConfigurator>.getConfiguratorSettings()
|
||||
}()
|
||||
|
||||
object {
|
||||
fun run() = super@AndroidTargetConfigurator.classFun() + super<ModuleConfiguratorWithTests>@AndroidTargetConfigurator.getConfiguratorSettings() + super<AndroidModuleConfigurator>@AndroidTargetConfigurator.getConfiguratorSettings()
|
||||
}.run()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
open class Base {
|
||||
fun classFun(): String = "Class"
|
||||
}
|
||||
|
||||
interface ModuleConfiguratorWithTests : ModuleConfiguratorWithSettings {
|
||||
override fun getConfiguratorSettings() = "K"
|
||||
}
|
||||
|
||||
interface ModuleConfiguratorWithSettings {
|
||||
fun getConfiguratorSettings(): String = ""
|
||||
}
|
||||
|
||||
|
||||
interface AndroidModuleConfigurator :
|
||||
ModuleConfiguratorWithSettings {
|
||||
override fun getConfiguratorSettings(): String {
|
||||
return "O"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sealed class FooSealed : Base() {
|
||||
class A : FooSealed()
|
||||
|
||||
class B: FooSealed()
|
||||
|
||||
inline fun test() {
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE!>super<!>.classFun()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
enum class FooEmum {
|
||||
A, B {
|
||||
|
||||
inline fun test() {
|
||||
super.classFun()
|
||||
}
|
||||
};
|
||||
|
||||
fun classFun(): String = "Class"
|
||||
}
|
||||
|
||||
class FooOuter : Base() {
|
||||
|
||||
inner class FooInner: Base() {
|
||||
inline fun test() {
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE!>super@FooOuter<!>.classFun()
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE!>super<!>.classFun()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
// !LANGUAGE: -ProhibitSuperCallsFromPublicInline
|
||||
// !DIAGNOSTICS: -EXPOSED_PARAMETER_TYPE -NOTHING_TO_INLINE
|
||||
|
||||
// FILE: main.kt
|
||||
open class AndroidTargetConfigurator :
|
||||
Base(),
|
||||
ModuleConfiguratorWithTests,
|
||||
AndroidModuleConfigurator {
|
||||
|
||||
public inline fun inlineFun(): String {
|
||||
return <!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super.classFun()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super<ModuleConfiguratorWithTests>.getConfiguratorSettings()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super<AndroidModuleConfigurator>.getConfiguratorSettings()<!>
|
||||
}
|
||||
|
||||
@PublishedApi
|
||||
internal inline fun inlineFunPublished(): String {
|
||||
return <!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super.classFun()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super<ModuleConfiguratorWithTests>.getConfiguratorSettings()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super<AndroidModuleConfigurator>.getConfiguratorSettings()<!>
|
||||
}
|
||||
|
||||
public inline fun inlineFunAnonymousObjects(): String {
|
||||
{
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super.classFun()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super<ModuleConfiguratorWithTests>.getConfiguratorSettings()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super<AndroidModuleConfigurator>.getConfiguratorSettings()<!>
|
||||
}()
|
||||
|
||||
return object {
|
||||
fun run() = <!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super@AndroidTargetConfigurator.classFun()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super<ModuleConfiguratorWithTests>@AndroidTargetConfigurator.getConfiguratorSettings()<!> + <!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super<AndroidModuleConfigurator>@AndroidTargetConfigurator.getConfiguratorSettings()<!>
|
||||
}.run()
|
||||
}
|
||||
|
||||
public inline fun inlineFunAnonymousNoDiagnostics(): String {
|
||||
return object: AndroidTargetConfigurator(), ModuleConfiguratorWithTests, AndroidModuleConfigurator {
|
||||
|
||||
override fun getConfiguratorSettings(): String {
|
||||
return super<AndroidTargetConfigurator>.getConfiguratorSettings()
|
||||
}
|
||||
|
||||
inline fun anonymousInline() {
|
||||
super.classFun() + super<<!QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE!>ModuleConfiguratorWithTests<!>>.getConfiguratorSettings() + super<<!QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE!>AndroidModuleConfigurator<!>>.getConfiguratorSettings()
|
||||
}
|
||||
|
||||
fun run() = super.classFun() + super<<!QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE!>ModuleConfiguratorWithTests<!>>.getConfiguratorSettings() + super<<!QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE!>AndroidModuleConfigurator<!>>.getConfiguratorSettings()
|
||||
}.run()
|
||||
}
|
||||
|
||||
|
||||
|
||||
internal inline fun inlineInternal(): String {
|
||||
return super.classFun() + super<ModuleConfiguratorWithTests>.getConfiguratorSettings() + super<AndroidModuleConfigurator>.getConfiguratorSettings()
|
||||
}
|
||||
|
||||
private inline fun inlinePrivate(): String {
|
||||
return super.classFun() + super<ModuleConfiguratorWithTests>.getConfiguratorSettings() + super<AndroidModuleConfigurator>.getConfiguratorSettings()
|
||||
}
|
||||
|
||||
|
||||
//non-inline
|
||||
override fun getConfiguratorSettings() =
|
||||
super.classFun() + super<ModuleConfiguratorWithTests>.getConfiguratorSettings() + super<AndroidModuleConfigurator>.getConfiguratorSettings()
|
||||
|
||||
fun noInline() {
|
||||
{
|
||||
super.classFun() + super<ModuleConfiguratorWithTests>.getConfiguratorSettings() + super<AndroidModuleConfigurator>.getConfiguratorSettings()
|
||||
}()
|
||||
|
||||
object {
|
||||
fun run() = super@AndroidTargetConfigurator.classFun() + super<ModuleConfiguratorWithTests>@AndroidTargetConfigurator.getConfiguratorSettings() + super<AndroidModuleConfigurator>@AndroidTargetConfigurator.getConfiguratorSettings()
|
||||
}.run()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
open class Base {
|
||||
fun classFun(): String = "Class"
|
||||
}
|
||||
|
||||
interface ModuleConfiguratorWithTests : ModuleConfiguratorWithSettings {
|
||||
override fun getConfiguratorSettings() = "K"
|
||||
}
|
||||
|
||||
interface ModuleConfiguratorWithSettings {
|
||||
fun getConfiguratorSettings(): String = ""
|
||||
}
|
||||
|
||||
|
||||
interface AndroidModuleConfigurator :
|
||||
ModuleConfiguratorWithSettings {
|
||||
override fun getConfiguratorSettings(): String {
|
||||
return "O"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sealed class FooSealed : Base() {
|
||||
class A : FooSealed()
|
||||
|
||||
class B: FooSealed()
|
||||
|
||||
inline fun test() {
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super.classFun()<!>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
enum class FooEmum {
|
||||
A, B {
|
||||
|
||||
inline fun test() {
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super.classFun()<!>
|
||||
}
|
||||
};
|
||||
|
||||
fun classFun(): String = "Class"
|
||||
}
|
||||
|
||||
class FooOuter : Base() {
|
||||
|
||||
inner class FooInner: Base() {
|
||||
inline fun test() {
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super@FooOuter.classFun()<!>
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE_WARNING!>super.classFun()<!>
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package
|
||||
|
||||
public interface AndroidModuleConfigurator : ModuleConfiguratorWithSettings {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ fun getConfiguratorSettings(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class AndroidTargetConfigurator : Base, ModuleConfiguratorWithTests, AndroidModuleConfigurator {
|
||||
public constructor AndroidTargetConfigurator()
|
||||
public final override /*1*/ /*fake_override*/ fun classFun(): kotlin.String
|
||||
public open override /*3*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ fun getConfiguratorSettings(): kotlin.String
|
||||
public open override /*3*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final inline fun inlineFun(): kotlin.String
|
||||
public final inline fun inlineFunAnonymousNoDiagnostics(): kotlin.String
|
||||
public final inline fun inlineFunAnonymousObjects(): kotlin.String
|
||||
@kotlin.PublishedApi internal final inline fun inlineFunPublished(): kotlin.String
|
||||
internal final inline fun inlineInternal(): kotlin.String
|
||||
private final inline fun inlinePrivate(): kotlin.String
|
||||
public final fun noInline(): kotlin.Unit
|
||||
public open override /*3*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class Base {
|
||||
public constructor Base()
|
||||
public final fun classFun(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final enum class FooEmum : kotlin.Enum<FooEmum> {
|
||||
enum entry A
|
||||
|
||||
enum entry B
|
||||
|
||||
private constructor FooEmum()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
public final fun classFun(): kotlin.String
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: FooEmum): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<FooEmum!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): FooEmum
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<FooEmum>
|
||||
}
|
||||
|
||||
public final class FooOuter : Base {
|
||||
public constructor FooOuter()
|
||||
public final override /*1*/ /*fake_override*/ fun classFun(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final inner class FooInner : Base {
|
||||
public constructor FooInner()
|
||||
public final override /*1*/ /*fake_override*/ fun classFun(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final inline fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class FooSealed : Base {
|
||||
protected constructor FooSealed()
|
||||
public final override /*1*/ /*fake_override*/ fun classFun(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final inline fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class A : FooSealed {
|
||||
public constructor A()
|
||||
public final override /*1*/ /*fake_override*/ fun classFun(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ inline /*fake_override*/ fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class B : FooSealed {
|
||||
public constructor B()
|
||||
public final override /*1*/ /*fake_override*/ fun classFun(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ inline /*fake_override*/ fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public interface ModuleConfiguratorWithSettings {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun getConfiguratorSettings(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface ModuleConfiguratorWithTests : ModuleConfiguratorWithSettings {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ fun getConfiguratorSettings(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
open class A {
|
||||
open fun test(s: String) = s
|
||||
}
|
||||
|
||||
object B : A() {
|
||||
override fun test(s: String) = "fail"
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline<!> fun doTest(s: String) = <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<!>.test(s)
|
||||
}
|
||||
|
||||
object C : A() {
|
||||
override fun test(s: String) = "fail"
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline<!> fun doTest(s: String) = <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<!>.test(s)
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return B.doTest("O") + C.doTest("K")
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
open class A {
|
||||
open fun test(s: String) = s
|
||||
}
|
||||
|
||||
object B : A() {
|
||||
override fun test(s: String) = "fail"
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline<!> fun doTest(s: String) = <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super.test(s)<!>
|
||||
}
|
||||
|
||||
object C : A() {
|
||||
override fun test(s: String) = "fail"
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline<!> fun doTest(s: String) = <!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>super.test(s)<!>
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return B.doTest("O") + C.doTest("K")
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package
|
||||
|
||||
public fun box(): kotlin.String
|
||||
|
||||
package test {
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open fun test(/*0*/ s: kotlin.String): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object B : test.A {
|
||||
private constructor B()
|
||||
public final inline fun doTest(/*0*/ s: kotlin.String): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ fun test(/*0*/ s: kotlin.String): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object C : test.A {
|
||||
private constructor C()
|
||||
public final inline fun doTest(/*0*/ s: kotlin.String): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ fun test(/*0*/ s: kotlin.String): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
open class A {
|
||||
open val test = "OK"
|
||||
}
|
||||
|
||||
object X : A() {
|
||||
override val test: String
|
||||
get() = "fail"
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline<!> fun doTest(): String {
|
||||
return <!SUPER_CALL_FROM_PUBLIC_INLINE!>super<!>.test
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return X.doTest()
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
open class A {
|
||||
open val test = "OK"
|
||||
}
|
||||
|
||||
object X : A() {
|
||||
override val test: String
|
||||
get() = "fail"
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline<!> fun doTest(): String {
|
||||
<!SUPER_CALL_FROM_PUBLIC_INLINE_ERROR!>return super.test<!>
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return X.doTest()
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package
|
||||
|
||||
public fun box(): kotlin.String
|
||||
|
||||
package test {
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open val test: kotlin.String = "OK"
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object X : test.A {
|
||||
private constructor X()
|
||||
public open override /*1*/ val test: kotlin.String
|
||||
public final inline fun doTest(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user