Render platform name in multiplatform diagnostic tests
Prepend the platform name to the diagnostic in a common module, which is reported when sources of that common module are analyzed as a part of the platform source set: "<!JVM:...!> ... <!>". Fix some existing tests, mostly by adding "impl" to implementations
This commit is contained in:
+9
-9
@@ -4,15 +4,15 @@
|
||||
// FILE: common.kt
|
||||
|
||||
header class C1
|
||||
header class C2<A>
|
||||
header class C3<B>
|
||||
header class C4<D, E>
|
||||
header class C5<F, G>
|
||||
header class C6<H>
|
||||
header class C7<I>
|
||||
header class C8<J>
|
||||
header class C9<K>
|
||||
header class C10<L>
|
||||
header interface <!JVM:HEADER_WITHOUT_IMPLEMENTATION!>C2<!><A>
|
||||
header interface <!JVM:HEADER_WITHOUT_IMPLEMENTATION!>C3<!><B>
|
||||
header interface C4<D, E>
|
||||
header interface C5<F, G>
|
||||
header interface C6<H>
|
||||
header interface C7<I>
|
||||
header interface C8<J>
|
||||
header interface C9<K>
|
||||
header interface C10<L>
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
+6
-6
@@ -9,16 +9,16 @@ header class Foo {
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
class Foo {
|
||||
val foo: String = "JVM"
|
||||
impl class Foo {
|
||||
impl val foo: String = "JVM"
|
||||
|
||||
fun bar(x: Int): Int = x + 1
|
||||
impl fun bar(x: Int): Int = x + 1
|
||||
}
|
||||
|
||||
// MODULE: m3-js(m1-common)
|
||||
// FILE: js.kt
|
||||
class Foo {
|
||||
val foo: String = "JS"
|
||||
impl class Foo {
|
||||
impl val foo: String = "JS"
|
||||
|
||||
fun bar(x: Int): Int = x - 1
|
||||
impl fun bar(x: Int): Int = x - 1
|
||||
}
|
||||
|
||||
+4
-4
@@ -14,10 +14,10 @@ public final header class Foo {
|
||||
// -- Module: <m2-jvm> --
|
||||
package
|
||||
|
||||
public final class Foo {
|
||||
public final impl class Foo {
|
||||
public constructor Foo()
|
||||
public final val foo: kotlin.String = "JVM"
|
||||
public final fun bar(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
public final impl fun bar(/*0*/ x: kotlin.Int): 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 open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
@@ -27,10 +27,10 @@ public final class Foo {
|
||||
// -- Module: <m3-js> --
|
||||
package
|
||||
|
||||
public final class Foo {
|
||||
public final impl class Foo {
|
||||
public constructor Foo()
|
||||
public final val foo: kotlin.String = "JS"
|
||||
public final fun bar(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
public final impl fun bar(/*0*/ x: kotlin.Int): 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 open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ header class Foo
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
class Foo
|
||||
impl class Foo
|
||||
|
||||
// MODULE: m3-js(m1-common)
|
||||
// FILE: js.kt
|
||||
class Foo
|
||||
impl class Foo
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ public final header class Foo {
|
||||
// -- Module: <m2-jvm> --
|
||||
package
|
||||
|
||||
public final class Foo {
|
||||
public final impl class Foo {
|
||||
public constructor Foo()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@@ -23,7 +23,7 @@ public final class Foo {
|
||||
// -- Module: <m3-js> --
|
||||
package
|
||||
|
||||
public final class Foo {
|
||||
public final impl class Foo {
|
||||
public constructor Foo()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@ header class Foo : I, C, J
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
class Foo : I, C(), J
|
||||
impl class Foo : I, C(), J
|
||||
|
||||
// MODULE: m3-js(m1-common)
|
||||
// FILE: js.kt
|
||||
class Foo : I, J, C()
|
||||
impl class Foo : I, J, C()
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ public open class C {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Foo : I, C, J {
|
||||
public final impl class Foo : I, C, J {
|
||||
public constructor Foo()
|
||||
public open override /*3*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*3*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@@ -68,7 +68,7 @@ public open class C {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Foo : I, J, C {
|
||||
public final impl class Foo : I, J, C {
|
||||
public constructor Foo()
|
||||
public open override /*3*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*3*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@
|
||||
// FILE: common.kt
|
||||
package common
|
||||
|
||||
header fun foo()
|
||||
<!JS:HEADER_WITHOUT_IMPLEMENTATION, JVM:HEADER_WITHOUT_IMPLEMENTATION!>header fun foo()<!>
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
inline header fun inlineFun()
|
||||
<!JVM:HEADER_WITHOUT_IMPLEMENTATION!>inline header fun inlineFun()<!>
|
||||
header fun nonInlineFun()
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
|
||||
Reference in New Issue
Block a user