[FIR] Report separate error for delegated constructor call to interface
#KT-59216 Fixed
This commit is contained in:
committed by
Space Team
parent
5abab2197b
commit
e7c213e06e
+6
-6
@@ -2,12 +2,12 @@
|
||||
// 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><!>()
|
||||
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 : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>() -> Int<!>()
|
||||
interface IB : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(() -> Int)<!>()
|
||||
|
||||
+6
-6
@@ -2,12 +2,12 @@
|
||||
// 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><!>()
|
||||
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 : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>() -> Int<!>()
|
||||
interface IB : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(() -> Int)<!>()
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// COMPARE_WITH_LIGHT_TREE
|
||||
// FILE: test.kt
|
||||
enum class MyEnum(): <!CLASS_IN_SUPERTYPE_FOR_ENUM!>MyClass<!>() {}
|
||||
enum class MyEnum2(): MyTrait {}
|
||||
enum class MyEnum2_1(): <!UNRESOLVED_REFERENCE!>MyTrait<!>() {}
|
||||
enum class MyEnum2_1(): MyTrait<!NO_CONSTRUCTOR!>()<!> {}
|
||||
enum class MyEnum3(): <!CLASS_IN_SUPERTYPE_FOR_ENUM, FINAL_SUPERTYPE, INVISIBLE_REFERENCE!>MyEnumBase<!>() {}
|
||||
|
||||
open class MyClass() {}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// COMPARE_WITH_LIGHT_TREE
|
||||
// FILE: test.kt
|
||||
enum class MyEnum(): <!CLASS_IN_SUPERTYPE_FOR_ENUM!>MyClass<!>() {}
|
||||
enum class MyEnum2(): MyTrait {}
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package typeReferenceError
|
||||
|
||||
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class Pair<!><<!SYNTAX!><!>:<!UNRESOLVED_REFERENCE!>(<!UNSUPPORTED!>val<!> c: <!SYNTAX!><!SYNTAX!><!>fun<!><!SYNTAX!><!> <!UNRESOLVED_REFERENCE!>main<!><!>()
|
||||
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class Pair<!><<!SYNTAX!><!>:(<!UNSUPPORTED!>val<!> c: <!SYNTAX!><!SYNTAX!><!>fun<!><!SYNTAX!><!> <!UNRESOLVED_REFERENCE!>main<!><!NO_CONSTRUCTOR!>()<!>
|
||||
|
||||
Reference in New Issue
Block a user