Extension function type is not allowed as supertype
This commit is contained in:
@@ -172,6 +172,7 @@ public interface Errors {
|
||||
|
||||
DiagnosticFactory0<JetTypeReference> DELEGATION_NOT_TO_INTERFACE = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<JetTypeReference> SUPERTYPE_NOT_A_CLASS_OR_INTERFACE = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<JetTypeReference> SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
DiagnosticFactory0<PsiElement> NO_GENERICS_IN_SUPERTYPE_SPECIFIER = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
|
||||
+1
@@ -434,6 +434,7 @@ public class DefaultErrorMessages {
|
||||
|
||||
MAP.put(MANY_CLASSES_IN_SUPERTYPE_LIST, "Only one class may appear in a supertype list");
|
||||
MAP.put(SUPERTYPE_NOT_A_CLASS_OR_INTERFACE, "Only classes and interfaces may serve as supertypes");
|
||||
MAP.put(SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE, "Extension function type is not allowed as supertypes");
|
||||
MAP.put(SUPERTYPE_INITIALIZED_IN_INTERFACE, "Interfaces cannot initialize supertypes");
|
||||
MAP.put(CLASS_IN_SUPERTYPE_FOR_ENUM, "Enum class cannot inherit from classes");
|
||||
MAP.put(CONSTRUCTOR_IN_INTERFACE, "An interface may not have a constructor");
|
||||
|
||||
@@ -24,6 +24,7 @@ import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns;
|
||||
import org.jetbrains.kotlin.descriptors.*;
|
||||
import org.jetbrains.kotlin.descriptors.impl.SyntheticFieldDescriptor;
|
||||
import org.jetbrains.kotlin.diagnostics.Errors;
|
||||
@@ -444,6 +445,10 @@ public class BodyResolver {
|
||||
if (classDescriptor != null) {
|
||||
if (ErrorUtils.isError(classDescriptor)) continue;
|
||||
|
||||
if (KotlinBuiltIns.isExactExtensionFunctionType(supertype)) {
|
||||
trace.report(SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE.on(typeReference));
|
||||
}
|
||||
|
||||
if (classDescriptor.getKind() != ClassKind.INTERFACE) {
|
||||
if (supertypeOwner.getKind() == ClassKind.ENUM_CLASS) {
|
||||
trace.report(CLASS_IN_SUPERTYPE_FOR_ENUM.on(typeReference));
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
class A : <!SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE!>Double.() -> Unit<!> {
|
||||
override fun invoke(p1: Double) {}
|
||||
}
|
||||
|
||||
class B : <!SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE!>Int.(Double) -> Unit<!> {
|
||||
override fun invoke(p1: Int, p2: Double) {}
|
||||
}
|
||||
|
||||
open class C {}
|
||||
|
||||
abstract class A0 : <!SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE!>C.() -> Int<!>
|
||||
abstract class A1 : <!SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE!>C.(Int) -> Int<!>
|
||||
abstract class A2 : <!SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE!>C.(Int, String) -> Int<!>
|
||||
|
||||
open class D<T> {}
|
||||
|
||||
abstract class B0<T> : <!SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE!>D<T>.() -> Int<!>
|
||||
abstract class B1<T> : <!SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE!>D<T>.(C) -> Int<!>
|
||||
abstract class B2<T> : <!SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE!>D<T>.(T, C) -> T<!>
|
||||
|
||||
interface E<T> {}
|
||||
|
||||
abstract class C0: C(), <!SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE!>Int.() -> Double<!>
|
||||
abstract class C1<T>: C(), E<T>, <!SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE!>Int.(C) -> Double<!>
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
package
|
||||
|
||||
public final class A : kotlin.Double.() -> kotlin.Unit {
|
||||
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 override /*1*/ fun invoke(/*0*/ p1: kotlin.Double): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class A0 : C.() -> kotlin.Int {
|
||||
public constructor A0()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: C): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class A1 : C.(kotlin.Int) -> kotlin.Int {
|
||||
public constructor A1()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: C, /*1*/ p2: kotlin.Int): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class A2 : C.(kotlin.Int, kotlin.String) -> kotlin.Int {
|
||||
public constructor A2()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: C, /*1*/ p2: kotlin.Int, /*2*/ p3: kotlin.String): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class B : kotlin.Int.(kotlin.Double) -> kotlin.Unit {
|
||||
public constructor B()
|
||||
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 invoke(/*0*/ p1: kotlin.Int, /*1*/ p2: kotlin.Double): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class B0</*0*/ T> : D<T>.() -> kotlin.Int {
|
||||
public constructor B0</*0*/ T>()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: D<T>): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class B1</*0*/ T> : D<T>.(C) -> kotlin.Int {
|
||||
public constructor B1</*0*/ T>()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: D<T>, /*1*/ p2: C): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class B2</*0*/ T> : D<T>.(T, C) -> T {
|
||||
public constructor B2</*0*/ T>()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: D<T>, /*1*/ p2: T, /*2*/ p3: C): T
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class C {
|
||||
public constructor C()
|
||||
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 abstract class C0 : C, kotlin.Int.() -> kotlin.Double {
|
||||
public constructor C0()
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: kotlin.Int): kotlin.Double
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class C1</*0*/ T> : C, E<T>, kotlin.Int.(C) -> kotlin.Double {
|
||||
public constructor C1</*0*/ T>()
|
||||
public open override /*3*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*3*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: kotlin.Int, /*1*/ p2: C): kotlin.Double
|
||||
public open override /*3*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class D</*0*/ T> {
|
||||
public constructor D</*0*/ T>()
|
||||
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 interface E</*0*/ T> {
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
class A : () -> Unit {
|
||||
override fun invoke() {}
|
||||
}
|
||||
|
||||
class AA : Function0<Unit> {
|
||||
override fun invoke() {}
|
||||
}
|
||||
|
||||
class B : (Double) -> Unit {
|
||||
override fun invoke(p1: Double) {}
|
||||
}
|
||||
|
||||
class BB : Function1<Double, Unit> {
|
||||
override fun invoke(p1: Double) {}
|
||||
}
|
||||
|
||||
open class C {}
|
||||
|
||||
abstract class A0 : (C) -> Int
|
||||
abstract class A1 : Function1<C, Int>
|
||||
|
||||
abstract class A2 : (C, Int) -> Int
|
||||
abstract class A3 : Function2<C, Int, Int>
|
||||
|
||||
abstract class A4 : (Int, C, String) -> Int
|
||||
abstract class A5 : Function3<Int, C, String, Int>
|
||||
|
||||
open class D<T> {}
|
||||
|
||||
abstract class B0<T> : (D<T>) -> Int
|
||||
abstract class B1<T> : Function1<D<T>, Int>
|
||||
|
||||
abstract class B2<T> : (D<T>, C) -> Int
|
||||
abstract class B3<T> : Function2<D<T>, C, Int>
|
||||
|
||||
abstract class B4<T> : (D<T>, C) -> T
|
||||
abstract class B5<T> : Function2<D<T>, C, T>
|
||||
|
||||
interface E<T> {}
|
||||
|
||||
abstract class C0: C(), (Int) -> Double
|
||||
abstract class C1: C(), Function1<Int, Double>
|
||||
|
||||
abstract class C2<T>: C(), E<T>, (Int, C) -> Double
|
||||
abstract class C3<T>: C(), E<T>, Function2<Int, C, Double>
|
||||
@@ -0,0 +1,181 @@
|
||||
package
|
||||
|
||||
public final class A : () -> kotlin.Unit {
|
||||
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 override /*1*/ fun invoke(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class A0 : (C) -> kotlin.Int {
|
||||
public constructor A0()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: C): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class A1 : (C) -> kotlin.Int {
|
||||
public constructor A1()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: C): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class A2 : (C, kotlin.Int) -> kotlin.Int {
|
||||
public constructor A2()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: C, /*1*/ p2: kotlin.Int): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class A3 : (C, kotlin.Int) -> kotlin.Int {
|
||||
public constructor A3()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: C, /*1*/ p2: kotlin.Int): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class A4 : (kotlin.Int, C, kotlin.String) -> kotlin.Int {
|
||||
public constructor A4()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: kotlin.Int, /*1*/ p2: C, /*2*/ p3: kotlin.String): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class A5 : (kotlin.Int, C, kotlin.String) -> kotlin.Int {
|
||||
public constructor A5()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: kotlin.Int, /*1*/ p2: C, /*2*/ p3: kotlin.String): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class AA : () -> kotlin.Unit {
|
||||
public constructor AA()
|
||||
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 invoke(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class B : (kotlin.Double) -> kotlin.Unit {
|
||||
public constructor B()
|
||||
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 invoke(/*0*/ p1: kotlin.Double): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class B0</*0*/ T> : (D<T>) -> kotlin.Int {
|
||||
public constructor B0</*0*/ T>()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: D<T>): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class B1</*0*/ T> : (D<T>) -> kotlin.Int {
|
||||
public constructor B1</*0*/ T>()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: D<T>): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class B2</*0*/ T> : (D<T>, C) -> kotlin.Int {
|
||||
public constructor B2</*0*/ T>()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: D<T>, /*1*/ p2: C): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class B3</*0*/ T> : (D<T>, C) -> kotlin.Int {
|
||||
public constructor B3</*0*/ T>()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: D<T>, /*1*/ p2: C): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class B4</*0*/ T> : (D<T>, C) -> T {
|
||||
public constructor B4</*0*/ T>()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: D<T>, /*1*/ p2: C): T
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class B5</*0*/ T> : (D<T>, C) -> T {
|
||||
public constructor B5</*0*/ T>()
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: D<T>, /*1*/ p2: C): T
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class BB : (kotlin.Double) -> kotlin.Unit {
|
||||
public constructor BB()
|
||||
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 invoke(/*0*/ p1: kotlin.Double): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class C {
|
||||
public constructor C()
|
||||
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 abstract class C0 : C, (kotlin.Int) -> kotlin.Double {
|
||||
public constructor C0()
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: kotlin.Int): kotlin.Double
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class C1 : C, (kotlin.Int) -> kotlin.Double {
|
||||
public constructor C1()
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: kotlin.Int): kotlin.Double
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class C2</*0*/ T> : C, E<T>, (kotlin.Int, C) -> kotlin.Double {
|
||||
public constructor C2</*0*/ T>()
|
||||
public open override /*3*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*3*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: kotlin.Int, /*1*/ p2: C): kotlin.Double
|
||||
public open override /*3*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class C3</*0*/ T> : C, E<T>, (kotlin.Int, C) -> kotlin.Double {
|
||||
public constructor C3</*0*/ T>()
|
||||
public open override /*3*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*3*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract override /*1*/ /*fake_override*/ fun invoke(/*0*/ p1: kotlin.Int, /*1*/ p2: C): kotlin.Double
|
||||
public open override /*3*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class D</*0*/ T> {
|
||||
public constructor D</*0*/ T>()
|
||||
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 interface E</*0*/ T> {
|
||||
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
|
||||
}
|
||||
@@ -15144,12 +15144,24 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/subtyping"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("extFunctionTypeAsSuperType.kt")
|
||||
public void testExtFunctionTypeAsSuperType() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/extFunctionTypeAsSuperType.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("findClosestCorrespondingSupertype.kt")
|
||||
public void testFindClosestCorrespondingSupertype() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/findClosestCorrespondingSupertype.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("functionTypeAsSuperType.kt")
|
||||
public void testFunctionTypeAsSuperType() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/functionTypeAsSuperType.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt2069.kt")
|
||||
public void testKt2069() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/kt2069.kt");
|
||||
|
||||
@@ -43,5 +43,4 @@ class InheritingClasses {
|
||||
}
|
||||
|
||||
abstract class InheritFunctionType : ((Int, String) -> Int)
|
||||
abstract class InheritExtensionFunctionType : (E.(Int, String) -> Int)
|
||||
}
|
||||
@@ -315,42 +315,6 @@ PsiJetFileStubImpl[package=a]
|
||||
REFERENCE_EXPRESSION:[referencedName=InheritAny]
|
||||
REFERENCE_EXPRESSION:[referencedName=SomeTrait]
|
||||
CLASS_BODY:
|
||||
CLASS:[fqName=a.InheritingClasses.InheritExtensionFunctionType, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=false, name=InheritExtensionFunctionType, superNames=[]]
|
||||
MODIFIER_LIST:[abstract public]
|
||||
PRIMARY_CONSTRUCTOR:
|
||||
MODIFIER_LIST:[public]
|
||||
VALUE_PARAMETER_LIST:
|
||||
DELEGATION_SPECIFIER_LIST:
|
||||
DELEGATOR_SUPER_CLASS:
|
||||
TYPE_REFERENCE:
|
||||
FUNCTION_TYPE:
|
||||
FUNCTION_TYPE_RECEIVER:
|
||||
TYPE_REFERENCE:
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
REFERENCE_EXPRESSION:[referencedName=a]
|
||||
REFERENCE_EXPRESSION:[referencedName=InheritingClasses]
|
||||
REFERENCE_EXPRESSION:[referencedName=E]
|
||||
VALUE_PARAMETER_LIST:
|
||||
VALUE_PARAMETER:[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=null]
|
||||
TYPE_REFERENCE:
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||
REFERENCE_EXPRESSION:[referencedName=Int]
|
||||
VALUE_PARAMETER:[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=null]
|
||||
TYPE_REFERENCE:
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||
REFERENCE_EXPRESSION:[referencedName=String]
|
||||
TYPE_REFERENCE:
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||
REFERENCE_EXPRESSION:[referencedName=Int]
|
||||
CLASS_BODY:
|
||||
CLASS:[fqName=a.InheritingClasses.InheritFunctionType, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=false, name=InheritFunctionType, superNames=[]]
|
||||
MODIFIER_LIST:[abstract public]
|
||||
PRIMARY_CONSTRUCTOR:
|
||||
|
||||
Reference in New Issue
Block a user