// !JVM_DEFAULT_MODE: all-compatibility // JVM_TARGET: 1.8 // WITH_STDLIB interface Foo { fun test(p: T) = "fail" val T.prop: String get() = "fail" } interface FooDerived: Foo class Unspecialized : Foo open class UnspecializedFromDerived : FooDerived abstract class AbstractUnspecializedFromDerived : FooDerived open class Specialized : Foo abstract class AbstractSpecialized : Foo @JvmDefaultWithoutCompatibility open class UnspecializedFromDerivedNC : FooDerived @JvmDefaultWithoutCompatibility abstract class AbstractUnspecializedFromDerivedNC : FooDerived @JvmDefaultWithoutCompatibility open class SpecializedNC : Foo @JvmDefaultWithoutCompatibility abstract class AbstractSpecializedNC : Foo final class FinalSpecialized : Foo sealed class SealedSpecialized : Foo { open class A : SealedSpecialized(); } enum class EnumSpecialized : Foo { ENTRY { fun test() = 123 } } object ObjectSpecialized : Foo private class Outer { open class InnerSpecialized: Foo } fun local() { object : Foo {} } fun interface F : Foo { fun invoke(o: String): String } fun test(): String { if (F { o -> o + "K" }.invoke("O") != "OK") return "Fail" val lambda: (String) -> String = { o -> o + "K" } return F(lambda).invoke("O") }