[FIR] Only mark declaration name with ACTUAL_WITHOUT_EXPECT
#KT-58827 Fixed
This commit is contained in:
committed by
Space Team
parent
3e6175fe30
commit
c95a9ff55e
+2
-2
@@ -15,10 +15,10 @@
|
||||
// FILE: jvm.kt
|
||||
actual interface My {
|
||||
actual fun openFunPositive() = Unit
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun openFunNegative()<!>
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>openFunNegative<!>()
|
||||
actual fun abstractFun()
|
||||
|
||||
actual val openValPositive: Int get() = 0
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual val openValNegative: Int<!>
|
||||
actual val <!ACTUAL_WITHOUT_EXPECT!>openValNegative<!>: Int
|
||||
actual val abstractVal: Int
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
// FILE: common.kt
|
||||
|
||||
expect class Foo {
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun bar()<!>
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>bar<!>()
|
||||
}
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ fun foo1(x: String) {}
|
||||
fun foo2(x: Int, y: Int) {}
|
||||
fun foo2(x: String) {}
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun foo3(): String = ""<!>
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>foo3<!>(): String = ""
|
||||
fun foo4(x: Int): String = ""
|
||||
|
||||
actual class NoArgConstructor {
|
||||
|
||||
+3
-3
@@ -16,12 +16,12 @@ expect open class Foo3
|
||||
// FILE: jvm.kt
|
||||
|
||||
interface Foo1
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual interface Foo2<!>
|
||||
actual interface <!ACTUAL_WITHOUT_EXPECT!>Foo2<!>
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual var s: String = "value"<!>
|
||||
actual var <!ACTUAL_WITHOUT_EXPECT!>s<!>: String = "value"
|
||||
|
||||
fun foo2(): Int = 0
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual class <!PACKAGE_OR_CLASSIFIER_REDECLARATION!>Foo3<!><!>
|
||||
actual class <!ACTUAL_WITHOUT_EXPECT, PACKAGE_OR_CLASSIFIER_REDECLARATION!>Foo3<!>
|
||||
|
||||
class <!PACKAGE_OR_CLASSIFIER_REDECLARATION!>Foo3<!>
|
||||
|
||||
+4
-4
@@ -42,9 +42,9 @@ actual fun interface F1 {
|
||||
actual fun run()
|
||||
}
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual interface F2 {
|
||||
actual interface <!ACTUAL_WITHOUT_EXPECT!>F2<!> {
|
||||
actual fun run()
|
||||
}<!>
|
||||
}
|
||||
|
||||
actual typealias F3 = java.lang.Runnable
|
||||
|
||||
@@ -62,6 +62,6 @@ interface F6Typealias {
|
||||
fun run()
|
||||
}
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual typealias F6 = F6Typealias<!>
|
||||
actual typealias <!ACTUAL_WITHOUT_EXPECT!>F6<!> = F6Typealias
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual typealias F7 = NotSam<!>
|
||||
actual typealias <!ACTUAL_WITHOUT_EXPECT!>F7<!> = NotSam
|
||||
|
||||
+4
-4
@@ -30,9 +30,9 @@ actual open class Container {
|
||||
actual fun protectedFun1() {} // OK: protected -> public
|
||||
actual protected fun protectedFun2() {} // OK: protected -> protected
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual internal fun protectedFun3() {}<!> // BAD: protected -> internal
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual protected fun internalFun3() {}<!> // BAD: internal -> protected
|
||||
actual internal fun <!ACTUAL_WITHOUT_EXPECT!>protectedFun3<!>() {} // BAD: protected -> internal
|
||||
actual protected fun <!ACTUAL_WITHOUT_EXPECT!>internalFun3<!>() {} // BAD: internal -> protected
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual open fun openInternalFun() {}<!> // BAD: internal+open -> public
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual internal fun openPublicFun() {}<!> // BAD: open+public -> internal
|
||||
actual open fun <!ACTUAL_WITHOUT_EXPECT!>openInternalFun<!>() {} // BAD: internal+open -> public
|
||||
actual internal fun <!ACTUAL_WITHOUT_EXPECT!>openPublicFun<!>() {} // BAD: open+public -> internal
|
||||
}
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ expect class Foo : I, C, J
|
||||
// FILE: jvm.kt
|
||||
actual class Foo : I, C(), J
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual class Bar<!>
|
||||
actual class <!ACTUAL_WITHOUT_EXPECT!>Bar<!>
|
||||
|
||||
// MODULE: m3-js()()(m1-common)
|
||||
// FILE: js.kt
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
// MODULE: common
|
||||
// TARGET_PLATFORM: Common
|
||||
|
||||
// MODULE: main()()(common)
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual class A<!>
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// MODULE: common
|
||||
// TARGET_PLATFORM: Common
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ interface KotlinXStringDemoInterface {
|
||||
// FILE: StringDemoInterface.kt
|
||||
actual typealias StringDemoInterface = KotlinXStringDemoInterface
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT("actual fun StringDemoInterface.plusK(): <ERROR TYPE REF: Unresolved name: value>; The following declaration is incompatible: expect fun StringDemoInterface.plusK(): String")!>actual fun StringDemoIn<!INCOMPATIBLE_MATCHING!>terface.plusK() = <!EXPECT_CLASS_AS_FUNCTION!>StringValue<!>(value).plus("K")<!>.<!UNRESOLVED_REFERENCE!>value<!><!>
|
||||
actual fun StringDemoIn<!INCOMPATIBLE_MATCHING!>terface.<!ACTUAL_WITHOUT_EXPECT("actual fun StringDemoInterface.plusK(): <ERROR TYPE REF: Unresolved name: value>; The following declaration is incompatible: expect fun StringDemoInterface.plusK(): String")!>plusK<!>() = <!EXPECT_CLASS_AS_FUNCTION!>StringValue<!>(value).plus("K")<!>.<!UNRESOLVED_REFERENCE!>value<!>
|
||||
|
||||
// FILE: main.kt
|
||||
class StringDemo(override val value: String) : StringDemoInterface
|
||||
|
||||
+27
-27
@@ -8,19 +8,19 @@
|
||||
class Nested
|
||||
inner class Inner
|
||||
}<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual class CommonClass {
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun memberFun() {}<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual val memberProp: Int = 42<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual class Nested<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual inner class Inner<!>
|
||||
}<!>
|
||||
actual class <!ACTUAL_WITHOUT_EXPECT!>CommonClass<!> {
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>memberFun<!>() {}
|
||||
actual val <!ACTUAL_WITHOUT_EXPECT!>memberProp<!>: Int = 42
|
||||
actual class <!ACTUAL_WITHOUT_EXPECT!>Nested<!>
|
||||
actual inner class <!ACTUAL_WITHOUT_EXPECT!>Inner<!>
|
||||
}
|
||||
|
||||
<!NO_ACTUAL_FOR_EXPECT{JVM}!>expect fun commonFun()<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun commonFun() {}<!>
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>commonFun<!>() {}
|
||||
|
||||
<!NO_ACTUAL_FOR_EXPECT{JVM}!>expect val commonProperty: String<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual val commonProperty: String
|
||||
get() = "hello"<!>
|
||||
actual val <!ACTUAL_WITHOUT_EXPECT!>commonProperty<!>: String
|
||||
get() = "hello"
|
||||
|
||||
// MODULE: intermediate()()(common)
|
||||
// TARGET_PLATFORM: Common
|
||||
@@ -31,19 +31,19 @@ expect class IntermediateClass {
|
||||
class Nested
|
||||
inner class Inner
|
||||
}
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual class IntermediateClass {
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun memberFun() {}<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual val memberProp: Int = 42<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual class Nested<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual inner class Inner<!>
|
||||
}<!>
|
||||
actual class <!ACTUAL_WITHOUT_EXPECT!>IntermediateClass<!> {
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>memberFun<!>() {}
|
||||
actual val <!ACTUAL_WITHOUT_EXPECT!>memberProp<!>: Int = 42
|
||||
actual class <!ACTUAL_WITHOUT_EXPECT!>Nested<!>
|
||||
actual inner class <!ACTUAL_WITHOUT_EXPECT!>Inner<!>
|
||||
}
|
||||
|
||||
expect fun intermediateFun()
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun intermediateFun() {}<!>
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>intermediateFun<!>() {}
|
||||
|
||||
expect val intermediateProperty: String
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual val intermediateProperty: String
|
||||
get() = "hello"<!>
|
||||
actual val <!ACTUAL_WITHOUT_EXPECT!>intermediateProperty<!>: String
|
||||
get() = "hello"
|
||||
|
||||
// MODULE: main()()(intermediate)
|
||||
|
||||
@@ -53,16 +53,16 @@ expect class PlatformClass {
|
||||
class Nested
|
||||
inner class Inner
|
||||
}
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual class PlatformClass {
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun memberFun() {}<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual val memberProp: Int = 42<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual class Nested<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual inner class Inner<!>
|
||||
}<!>
|
||||
actual class <!ACTUAL_WITHOUT_EXPECT!>PlatformClass<!> {
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>memberFun<!>() {}
|
||||
actual val <!ACTUAL_WITHOUT_EXPECT!>memberProp<!>: Int = 42
|
||||
actual class <!ACTUAL_WITHOUT_EXPECT!>Nested<!>
|
||||
actual inner class <!ACTUAL_WITHOUT_EXPECT!>Inner<!>
|
||||
}
|
||||
|
||||
expect fun platformFun()
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun platformFun() {}<!>
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>platformFun<!>() {}
|
||||
|
||||
expect val platformProperty: String
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual val platformProperty: String
|
||||
get() = "hello"<!>
|
||||
actual val <!ACTUAL_WITHOUT_EXPECT!>platformProperty<!>: String
|
||||
get() = "hello"
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@ expect fun parameterCount()
|
||||
fun parameterCount(p: String) {}
|
||||
|
||||
<!NO_ACTUAL_FOR_EXPECT{JVM}!>expect fun parameterCount2()<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun parameterCount2(p: String) {}<!>
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>parameterCount2<!>(p: String) {}
|
||||
|
||||
expect fun callableKind(): Int
|
||||
val callableKind: Int = 1
|
||||
@@ -16,9 +16,9 @@ fun typeParameterCount() {}
|
||||
<!NO_ACTUAL_FOR_EXPECT{JVM}!>expect enum class EnumEntries {
|
||||
ONE, TWO;
|
||||
}<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual enum class EnumEntries {
|
||||
actual enum class <!ACTUAL_WITHOUT_EXPECT!>EnumEntries<!> {
|
||||
ONE;
|
||||
}<!>
|
||||
}
|
||||
|
||||
expect fun vararg(bar: Int)
|
||||
fun vararg(vararg bar: Int) = Unit
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!><!DEPRECATED_MODIFIER, INCOMPATIBLE_MODIFIERS!>header<!> <!INCOMPATIBLE_MODIFIERS!>impl<!> class First<!>
|
||||
<!DEPRECATED_MODIFIER, INCOMPATIBLE_MODIFIERS!>header<!> <!INCOMPATIBLE_MODIFIERS!>impl<!> class <!ACTUAL_WITHOUT_EXPECT!>First<!>
|
||||
|
||||
<!DEPRECATED_MODIFIER, INCOMPATIBLE_MODIFIERS!>header<!> <!INCOMPATIBLE_MODIFIERS!>expect<!> class Second
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!><!DEPRECATED_MODIFIER, INCOMPATIBLE_MODIFIERS!>header<!> <!INCOMPATIBLE_MODIFIERS!>actual<!> class Third<!>
|
||||
<!DEPRECATED_MODIFIER, INCOMPATIBLE_MODIFIERS!>header<!> <!INCOMPATIBLE_MODIFIERS!>actual<!> class <!ACTUAL_WITHOUT_EXPECT!>Third<!>
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!><!DEPRECATED_MODIFIER, INCOMPATIBLE_MODIFIERS!>impl<!> <!INCOMPATIBLE_MODIFIERS!>expect<!> class Fourth<!>
|
||||
<!DEPRECATED_MODIFIER, INCOMPATIBLE_MODIFIERS!>impl<!> <!INCOMPATIBLE_MODIFIERS!>expect<!> class <!ACTUAL_WITHOUT_EXPECT!>Fourth<!>
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!><!DEPRECATED_MODIFIER, INCOMPATIBLE_MODIFIERS!>impl<!> <!INCOMPATIBLE_MODIFIERS!>actual<!> class Fifth<!>
|
||||
<!DEPRECATED_MODIFIER, INCOMPATIBLE_MODIFIERS!>impl<!> <!INCOMPATIBLE_MODIFIERS!>actual<!> class <!ACTUAL_WITHOUT_EXPECT!>Fifth<!>
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!><!INCOMPATIBLE_MODIFIERS!>expect<!> <!INCOMPATIBLE_MODIFIERS!>actual<!> class Sixth<!>
|
||||
<!INCOMPATIBLE_MODIFIERS!>expect<!> <!INCOMPATIBLE_MODIFIERS!>actual<!> class <!ACTUAL_WITHOUT_EXPECT!>Sixth<!>
|
||||
|
||||
Vendored
+2
-2
@@ -23,6 +23,6 @@ actual inline class Foo1(val x: Int) {
|
||||
actual inline class <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>Foo2<!>(val x: String)
|
||||
actual <!ABSENCE_OF_PRIMARY_CONSTRUCTOR_FOR_VALUE_CLASS!>inline<!> class Foo3
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual inline class NonInlineExpect(val x: Int)<!>
|
||||
actual inline class <!ACTUAL_WITHOUT_EXPECT!>NonInlineExpect<!>(val x: Int)
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual class NonInlineActual actual constructor(actual val x: Int)<!>
|
||||
actual class <!ACTUAL_WITHOUT_EXPECT!>NonInlineActual<!> actual constructor(actual val x: Int)
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual class SomeClass {
|
||||
actual class <!ACTUAL_WITHOUT_EXPECT!>SomeClass<!> {
|
||||
actual fun foo() {}
|
||||
}<!>
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ fun foo() {
|
||||
// FILE: jvm.kt
|
||||
|
||||
class Outer <!ACTUAL_WITHOUT_EXPECT!>actual constructor()<!> {
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual class Nested<!>
|
||||
actual class <!ACTUAL_WITHOUT_EXPECT!>Nested<!>
|
||||
|
||||
<!WRONG_MODIFIER_TARGET!>actual<!> init {}
|
||||
}
|
||||
|
||||
+2
-2
@@ -8,10 +8,10 @@ package common
|
||||
// FILE: jvm.kt
|
||||
package jvm
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun foo() {}<!>
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>foo<!>() {}
|
||||
|
||||
// MODULE: m3-js()()(m1-common)
|
||||
// FILE: js.kt
|
||||
package js
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun foo() {}<!>
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>foo<!>() {}
|
||||
|
||||
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
expect fun foo()
|
||||
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
<!NON_MEMBER_FUNCTION_NO_BODY!>actual fun foo()<!>
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT, NON_MEMBER_FUNCTION_NO_BODY!>actual fun bar()<!>
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
// MODULE: m1-jvm
|
||||
// FILE: jvm.kt
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun foo() { }<!>
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// MODULE: m1-jvm
|
||||
// FILE: jvm.kt
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ expect fun nonInlineFun()
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun inlineFun() { }<!>
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>inlineFun<!>() { }
|
||||
actual fun nonInlineFun() { }
|
||||
|
||||
// MODULE: m3-js()()(m1-common)
|
||||
|
||||
Vendored
+4
-4
@@ -17,10 +17,10 @@ expect inline fun f6(crossinline s: () -> String)
|
||||
// FILE: jvm.kt
|
||||
|
||||
actual inline fun f1(noinline s: () -> String) {}
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual inline fun f2(noinline s: () -> String) {}<!>
|
||||
actual inline fun <!ACTUAL_WITHOUT_EXPECT!>f2<!>(noinline s: () -> String) {}
|
||||
actual inline fun f3(s: () -> String) {}
|
||||
actual inline fun f4(crossinline s: () -> String) {}
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual inline fun f5(crossinline s: () -> String) {}<!>
|
||||
actual inline fun <!ACTUAL_WITHOUT_EXPECT!>f5<!>(crossinline s: () -> String) {}
|
||||
actual inline fun f6(s: () -> String) {}
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun f7(vararg x: Any) {}<!>
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual fun f8(x: Any) {}<!>
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>f7<!>(vararg x: Any) {}
|
||||
actual fun <!ACTUAL_WITHOUT_EXPECT!>f8<!>(x: Any) {}
|
||||
|
||||
+6
-6
@@ -18,17 +18,17 @@ expect var v2: Boolean
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual var v1: Boolean = false
|
||||
private set<!>
|
||||
actual var <!ACTUAL_WITHOUT_EXPECT!>v1<!>: Boolean = false
|
||||
private set
|
||||
|
||||
actual var v2: Boolean = false
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual var v3: Boolean = false
|
||||
private set<!>
|
||||
actual var <!ACTUAL_WITHOUT_EXPECT!>v3<!>: Boolean = false
|
||||
private set
|
||||
|
||||
actual open class C {
|
||||
<!ACTUAL_WITHOUT_EXPECT!>actual var foo: Boolean = false
|
||||
protected set<!>
|
||||
actual var <!ACTUAL_WITHOUT_EXPECT!>foo<!>: Boolean = false
|
||||
protected set
|
||||
}
|
||||
|
||||
open class C2Typealias {
|
||||
|
||||
Reference in New Issue
Block a user