[FE 1.0] Prohibit call of constructor of functional supertype
^KT-46344 ^KT-50730 Fixed
This commit is contained in:
committed by
teamcity
parent
ecc890efe8
commit
ff7eb79bb1
+12
@@ -4721,6 +4721,18 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/ClassObjects.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classWithFunctionSupertype_after.kt")
|
||||
public void testClassWithFunctionSupertype_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/classWithFunctionSupertype_after.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classWithFunctionSupertype_before.kt")
|
||||
public void testClassWithFunctionSupertype_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/classWithFunctionSupertype_before.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("companionObjectOfPrivateClassVisibility.kt")
|
||||
public void testCompanionObjectOfPrivateClassVisibility() throws Exception {
|
||||
|
||||
+12
@@ -4721,6 +4721,18 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/ClassObjects.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classWithFunctionSupertype_after.kt")
|
||||
public void testClassWithFunctionSupertype_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/classWithFunctionSupertype_after.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classWithFunctionSupertype_before.kt")
|
||||
public void testClassWithFunctionSupertype_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/classWithFunctionSupertype_before.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("companionObjectOfPrivateClassVisibility.kt")
|
||||
public void testCompanionObjectOfPrivateClassVisibility() throws Exception {
|
||||
|
||||
+12
@@ -4721,6 +4721,18 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/ClassObjects.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classWithFunctionSupertype_after.kt")
|
||||
public void testClassWithFunctionSupertype_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/classWithFunctionSupertype_after.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classWithFunctionSupertype_before.kt")
|
||||
public void testClassWithFunctionSupertype_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/classWithFunctionSupertype_before.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("companionObjectOfPrivateClassVisibility.kt")
|
||||
public void testCompanionObjectOfPrivateClassVisibility() throws Exception {
|
||||
|
||||
@@ -837,6 +837,7 @@ public interface Errors {
|
||||
DiagnosticFactory0<PsiElement> TAIL_RECURSION_IN_TRY_IS_NOT_SUPPORTED = DiagnosticFactory0.create(WARNING, CALL_EXPRESSION);
|
||||
|
||||
DiagnosticFactory0<PsiElement> NO_CONSTRUCTOR = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<PsiElement> NO_CONSTRUCTOR_WARNING = DiagnosticFactory0.create(WARNING);
|
||||
DiagnosticFactory0<PsiElement> CREATING_AN_INSTANCE_OF_ABSTRACT_CLASS = DiagnosticFactory0.create(ERROR);
|
||||
DiagnosticFactory0<KtExpression> NOT_A_CLASS = DiagnosticFactory0.create(ERROR);
|
||||
|
||||
|
||||
+1
@@ -440,6 +440,7 @@ public class DefaultErrorMessages {
|
||||
MAP.put(DELEGATION_NOT_TO_INTERFACE, "Only interfaces can be delegated to");
|
||||
MAP.put(DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE, "Delegated member ''{0}'' hides supertype override: {1}. Please specify proper override explicitly", COMPACT, commaSeparated(SHORT_NAMES_IN_TYPES));
|
||||
MAP.put(NO_CONSTRUCTOR, "This class does not have a constructor");
|
||||
MAP.put(NO_CONSTRUCTOR_WARNING, "This class does not have a constructor. This warning will be an error in future releases");
|
||||
MAP.put(RESOLUTION_TO_CLASSIFIER, "{2}", NAME, TO_STRING, STRING);
|
||||
MAP.put(NOT_A_CLASS, "Not a class");
|
||||
MAP.put(ILLEGAL_ESCAPE_SEQUENCE, "Illegal escape sequence");
|
||||
|
||||
@@ -382,6 +382,7 @@ public class CallResolver {
|
||||
KtReferenceExpression functionReference = expression.getConstructorReferenceExpression();
|
||||
KtTypeReference typeReference = expression.getTypeReference();
|
||||
if (functionReference == null || typeReference == null) {
|
||||
CallResolverUtilKt.checkForConstructorCallOnFunctionalType(typeReference, context);
|
||||
return checkArgumentTypesAndFail(context); // No type there
|
||||
}
|
||||
KotlinType constructedType = typeResolver.resolveType(context.scope, typeReference, context.trace, true);
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.jetbrains.kotlin.config.LanguageFeature
|
||||
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.impl.TypeAliasConstructorDescriptor
|
||||
import org.jetbrains.kotlin.diagnostics.Errors
|
||||
import org.jetbrains.kotlin.lexer.KtToken
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType
|
||||
@@ -376,3 +377,16 @@ internal fun PSIKotlinCall.replaceArguments(
|
||||
callKind, psiCall, tracingStrategy, newReceiverArgument, dispatchReceiverForInvokeExtension, name, typeArguments, newArguments,
|
||||
externalArgument, startingDataFlowInfo, resultDataFlowInfo, dataFlowInfoForArguments, isForImplicitInvoke
|
||||
)
|
||||
|
||||
fun checkForConstructorCallOnFunctionalType(
|
||||
typeReference: KtTypeReference?,
|
||||
context: BasicCallResolutionContext
|
||||
) {
|
||||
if (typeReference?.typeElement is KtFunctionType) {
|
||||
val factory = when (context.languageVersionSettings.supportsFeature(LanguageFeature.ProhibitConstructorCallOnFunctionalSupertype)) {
|
||||
true -> Errors.NO_CONSTRUCTOR
|
||||
false -> Errors.NO_CONSTRUCTOR_WARNING
|
||||
}
|
||||
context.trace.report(factory.on(context.call.getValueArgumentListOrElement()))
|
||||
}
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// WITH_STDLIB
|
||||
// LANGUAGE: +ProhibitConstructorCallOnFunctionalSupertype
|
||||
// ISSUE: KT-46344
|
||||
|
||||
abstract class A : <!UNRESOLVED_REFERENCE!>() -> Int<!>()
|
||||
abstract class B : <!UNRESOLVED_REFERENCE!>(() -> Int)<!>()
|
||||
abstract class C : <!UNRESOLVED_REFERENCE!>Function0<Int><!>()
|
||||
abstract class D : <!UNRESOLVED_REFERENCE!>suspend () -> Int<!>()
|
||||
abstract class E : <!UNRESOLVED_REFERENCE!>(suspend () -> Int)<!>()
|
||||
abstract class F : <!UNRESOLVED_REFERENCE!>kotlin.coroutines.SuspendFunction0<Int><!>()
|
||||
|
||||
interface IA : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>() -> Int<!>()
|
||||
interface IB : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(() -> Int)<!>()
|
||||
interface IC : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>Function0<Int><!>()
|
||||
interface ID : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>suspend () -> Int<!>()
|
||||
interface IE : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(suspend () -> Int)<!>()
|
||||
interface IF : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>kotlin.coroutines.SuspendFunction0<Int><!>()
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// WITH_STDLIB
|
||||
// LANGUAGE: +ProhibitConstructorCallOnFunctionalSupertype
|
||||
// ISSUE: KT-46344
|
||||
|
||||
abstract class A : () -> Int<!NO_CONSTRUCTOR!>()<!>
|
||||
abstract class B : (() -> Int)<!NO_CONSTRUCTOR!>()<!>
|
||||
abstract class C : Function0<Int><!NO_CONSTRUCTOR!>()<!>
|
||||
abstract class D : suspend () -> Int<!NO_CONSTRUCTOR!>()<!>
|
||||
abstract class E : (suspend () -> Int)<!NO_CONSTRUCTOR!>()<!>
|
||||
abstract class F : kotlin.coroutines.SuspendFunction0<Int><!NO_CONSTRUCTOR!>()<!>
|
||||
|
||||
interface IA : () -> Int<!SUPERTYPE_INITIALIZED_IN_INTERFACE!>()<!>
|
||||
interface IB : (() -> Int)<!SUPERTYPE_INITIALIZED_IN_INTERFACE!>()<!>
|
||||
interface IC : Function0<Int><!SUPERTYPE_INITIALIZED_IN_INTERFACE!>()<!>
|
||||
interface ID : suspend () -> Int<!SUPERTYPE_INITIALIZED_IN_INTERFACE!>()<!>
|
||||
interface IE : (suspend () -> Int)<!SUPERTYPE_INITIALIZED_IN_INTERFACE!>()<!>
|
||||
interface IF : kotlin.coroutines.SuspendFunction0<Int><!SUPERTYPE_INITIALIZED_IN_INTERFACE!>()<!>
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package
|
||||
|
||||
public abstract class A : () -> kotlin.Int {
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class B : () -> kotlin.Int {
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class C : () -> kotlin.Int {
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class D : suspend () -> kotlin.Int {
|
||||
public constructor D()
|
||||
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*/ suspend /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class E : suspend () -> kotlin.Int {
|
||||
public constructor E()
|
||||
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*/ suspend /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class F : suspend () -> kotlin.Int {
|
||||
public constructor F()
|
||||
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*/ suspend /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface IA : () -> kotlin.Int {
|
||||
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(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface IB : () -> kotlin.Int {
|
||||
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(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface IC : () -> kotlin.Int {
|
||||
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(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface ID : suspend () -> kotlin.Int {
|
||||
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*/ suspend /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface IE : suspend () -> kotlin.Int {
|
||||
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*/ suspend /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface IF : suspend () -> kotlin.Int {
|
||||
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*/ suspend /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// WITH_STDLIB
|
||||
// LANGUAGE: -ProhibitConstructorCallOnFunctionalSupertype
|
||||
// ISSUE: KT-46344
|
||||
|
||||
abstract class A : <!UNRESOLVED_REFERENCE!>() -> Int<!>()
|
||||
abstract class B : <!UNRESOLVED_REFERENCE!>(() -> Int)<!>()
|
||||
abstract class C : <!UNRESOLVED_REFERENCE!>Function0<Int><!>()
|
||||
abstract class D : <!UNRESOLVED_REFERENCE!>suspend () -> Int<!>()
|
||||
abstract class E : <!UNRESOLVED_REFERENCE!>(suspend () -> Int)<!>()
|
||||
abstract class F : <!UNRESOLVED_REFERENCE!>kotlin.coroutines.SuspendFunction0<Int><!>()
|
||||
|
||||
interface IA : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>() -> Int<!>()
|
||||
interface IB : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(() -> Int)<!>()
|
||||
interface IC : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>Function0<Int><!>()
|
||||
interface ID : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>suspend () -> Int<!>()
|
||||
interface IE : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(suspend () -> Int)<!>()
|
||||
interface IF : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>kotlin.coroutines.SuspendFunction0<Int><!>()
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// WITH_STDLIB
|
||||
// LANGUAGE: -ProhibitConstructorCallOnFunctionalSupertype
|
||||
// ISSUE: KT-46344
|
||||
|
||||
abstract class A : () -> Int<!NO_CONSTRUCTOR_WARNING!>()<!>
|
||||
abstract class B : (() -> Int)<!NO_CONSTRUCTOR_WARNING!>()<!>
|
||||
abstract class C : Function0<Int><!NO_CONSTRUCTOR!>()<!>
|
||||
abstract class D : suspend () -> Int<!NO_CONSTRUCTOR_WARNING!>()<!>
|
||||
abstract class E : (suspend () -> Int)<!NO_CONSTRUCTOR_WARNING!>()<!>
|
||||
abstract class F : kotlin.coroutines.SuspendFunction0<Int><!NO_CONSTRUCTOR!>()<!>
|
||||
|
||||
interface IA : () -> Int<!SUPERTYPE_INITIALIZED_IN_INTERFACE!>()<!>
|
||||
interface IB : (() -> Int)<!SUPERTYPE_INITIALIZED_IN_INTERFACE!>()<!>
|
||||
interface IC : Function0<Int><!SUPERTYPE_INITIALIZED_IN_INTERFACE!>()<!>
|
||||
interface ID : suspend () -> Int<!SUPERTYPE_INITIALIZED_IN_INTERFACE!>()<!>
|
||||
interface IE : (suspend () -> Int)<!SUPERTYPE_INITIALIZED_IN_INTERFACE!>()<!>
|
||||
interface IF : kotlin.coroutines.SuspendFunction0<Int><!SUPERTYPE_INITIALIZED_IN_INTERFACE!>()<!>
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package
|
||||
|
||||
public abstract class A : () -> kotlin.Int {
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class B : () -> kotlin.Int {
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class C : () -> kotlin.Int {
|
||||
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 abstract override /*1*/ /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class D : suspend () -> kotlin.Int {
|
||||
public constructor D()
|
||||
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*/ suspend /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class E : suspend () -> kotlin.Int {
|
||||
public constructor E()
|
||||
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*/ suspend /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class F : suspend () -> kotlin.Int {
|
||||
public constructor F()
|
||||
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*/ suspend /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface IA : () -> kotlin.Int {
|
||||
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(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface IB : () -> kotlin.Int {
|
||||
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(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface IC : () -> kotlin.Int {
|
||||
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(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface ID : suspend () -> kotlin.Int {
|
||||
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*/ suspend /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface IE : suspend () -> kotlin.Int {
|
||||
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*/ suspend /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface IF : suspend () -> kotlin.Int {
|
||||
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*/ suspend /*fake_override*/ fun invoke(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
||||
package typeReferenceError
|
||||
|
||||
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class Pair<!><<!SYNTAX!><!>:(<!UNSUPPORTED!>val<!> <!UNSUPPORTED!>c<!>: <!SYNTAX!><!SYNTAX!><!>fun<!><!SYNTAX!><!> <!UNRESOLVED_REFERENCE!>main<!>()
|
||||
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class Pair<!><<!SYNTAX!><!>:(<!UNSUPPORTED!>val<!> <!UNSUPPORTED!>c<!>: <!SYNTAX!><!SYNTAX!><!>fun<!><!SYNTAX!><!> <!UNRESOLVED_REFERENCE!>main<!><!NO_CONSTRUCTOR_WARNING!>()<!>
|
||||
|
||||
Generated
+12
@@ -4727,6 +4727,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/ClassObjects.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classWithFunctionSupertype_after.kt")
|
||||
public void testClassWithFunctionSupertype_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/classWithFunctionSupertype_after.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classWithFunctionSupertype_before.kt")
|
||||
public void testClassWithFunctionSupertype_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/classWithFunctionSupertype_before.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("companionObjectOfPrivateClassVisibility.kt")
|
||||
public void testCompanionObjectOfPrivateClassVisibility() throws Exception {
|
||||
|
||||
@@ -258,6 +258,7 @@ enum class LanguageFeature(
|
||||
|
||||
DisableCheckingChangedProgressionsResolve(KOTLIN_1_9), // KT-49276
|
||||
ProhibitIllegalValueParameterUsageInDefaultArguments(KOTLIN_1_9, kind = BUG_FIX), // KT-25694
|
||||
ProhibitConstructorCallOnFunctionalSupertype(KOTLIN_1_9, kind = BUG_FIX), // KT-46344
|
||||
|
||||
// Temporarily disabled, see KT-27084/KT-22379
|
||||
SoundSmartcastFromLoopConditionForLoopAssignedVariables(sinceVersion = null, kind = BUG_FIX),
|
||||
|
||||
Reference in New Issue
Block a user