Rename platform to header.
This commit is contained in:
+11
-11
@@ -2,28 +2,28 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
<!WRONG_MODIFIER_TARGET!>platform<!> typealias Foo = String
|
||||
<!WRONG_MODIFIER_TARGET!>header<!> typealias Foo = String
|
||||
|
||||
class Outer <!WRONG_MODIFIER_TARGET!>platform<!> constructor() {
|
||||
platform class Nested
|
||||
class Outer <!WRONG_MODIFIER_TARGET!>header<!> constructor() {
|
||||
header class Nested
|
||||
|
||||
<!WRONG_MODIFIER_TARGET!>platform<!> init {}
|
||||
<!WRONG_MODIFIER_TARGET!>header<!> init {}
|
||||
|
||||
<!NON_ABSTRACT_FUNCTION_WITH_NO_BODY!><!WRONG_MODIFIER_TARGET!>platform<!> fun foo()<!>
|
||||
<!WRONG_MODIFIER_TARGET!>platform<!> val bar: Int
|
||||
<!NON_ABSTRACT_FUNCTION_WITH_NO_BODY!><!WRONG_MODIFIER_TARGET!>header<!> fun foo()<!>
|
||||
<!WRONG_MODIFIER_TARGET!>header<!> val bar: Int
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
<!WRONG_MODIFIER_TARGET!>platform<!> fun localFun()
|
||||
<!WRONG_MODIFIER_TARGET!>platform<!> var <!UNUSED_VARIABLE!>x<!> = 42
|
||||
<!WRONG_MODIFIER_TARGET!>platform<!> class Bar
|
||||
<!WRONG_MODIFIER_TARGET!>header<!> fun localFun()
|
||||
<!WRONG_MODIFIER_TARGET!>header<!> var <!UNUSED_VARIABLE!>x<!> = 42
|
||||
<!WRONG_MODIFIER_TARGET!>header<!> class Bar
|
||||
}
|
||||
|
||||
// MODULE: m2-jvm
|
||||
// FILE: jvm.kt
|
||||
|
||||
class Outer impl constructor() {
|
||||
<!PLATFORM_DEFINITION_WITHOUT_DECLARATION!>impl<!> class Nested
|
||||
<!IMPLEMENTATION_WITHOUT_HEADER!>impl<!> class Nested
|
||||
|
||||
<!WRONG_MODIFIER_TARGET!>impl<!> init {}
|
||||
}
|
||||
@@ -31,5 +31,5 @@ class Outer impl constructor() {
|
||||
fun foo() {
|
||||
<!WRONG_MODIFIER_TARGET!>impl<!> fun localFun() {}
|
||||
<!WRONG_MODIFIER_TARGET!>impl<!> var <!UNUSED_VARIABLE!>x<!> = 42
|
||||
<!PLATFORM_DEFINITION_WITHOUT_DECLARATION, WRONG_MODIFIER_TARGET!>impl<!> class Bar
|
||||
<!IMPLEMENTATION_WITHOUT_HEADER, WRONG_MODIFIER_TARGET!>impl<!> class Bar
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,11 +7,11 @@ public final class Outer {
|
||||
public constructor Outer()
|
||||
public final val bar: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final platform fun foo(): kotlin.Unit
|
||||
public final header fun foo(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final platform class Nested {
|
||||
public final header class Nested {
|
||||
public constructor Nested()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+5
-5
@@ -2,15 +2,15 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
platform interface Interface
|
||||
header interface Interface
|
||||
|
||||
platform annotation class Anno(val prop: String)
|
||||
header annotation class Anno(val prop: String)
|
||||
|
||||
platform object Object
|
||||
header object Object
|
||||
|
||||
platform class Class
|
||||
header class Class
|
||||
|
||||
platform enum class En { ENTRY }
|
||||
header enum class En { ENTRY }
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
// -- Module: <m1-common> --
|
||||
package
|
||||
|
||||
public final platform annotation class Anno : kotlin.Annotation {
|
||||
public final header annotation class Anno : kotlin.Annotation {
|
||||
public constructor Anno(/*0*/ prop: kotlin.String)
|
||||
public final val prop: kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -9,14 +9,14 @@ public final platform annotation class Anno : kotlin.Annotation {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final platform class Class {
|
||||
public final header class Class {
|
||||
public constructor Class()
|
||||
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 final platform enum class En : kotlin.Enum<En> {
|
||||
public final header enum class En : kotlin.Enum<En> {
|
||||
enum entry ENTRY
|
||||
|
||||
private constructor En()
|
||||
@@ -33,13 +33,13 @@ public final platform enum class En : kotlin.Enum<En> {
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<En>
|
||||
}
|
||||
|
||||
public platform interface Interface {
|
||||
public header interface Interface {
|
||||
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 platform object Object {
|
||||
public header object Object {
|
||||
private constructor Object()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
Vendored
+4
-4
@@ -1,14 +1,14 @@
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
platform open class A {
|
||||
header open class A {
|
||||
constructor(s: String)
|
||||
|
||||
constructor(n: Number) : <!PLATFORM_CLASS_CONSTRUCTOR_DELEGATION_CALL!>this<!>("A")
|
||||
constructor(n: Number) : <!HEADER_CLASS_CONSTRUCTOR_DELEGATION_CALL!>this<!>("A")
|
||||
}
|
||||
|
||||
platform class B : A {
|
||||
header class B : A {
|
||||
constructor(i: Int)
|
||||
|
||||
constructor() : <!PLATFORM_CLASS_CONSTRUCTOR_DELEGATION_CALL!>super<!>("B")
|
||||
constructor() : <!HEADER_CLASS_CONSTRUCTOR_DELEGATION_CALL!>super<!>("B")
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
package
|
||||
|
||||
public open platform class A {
|
||||
public open header class A {
|
||||
public constructor A(/*0*/ n: kotlin.Number)
|
||||
public constructor A(/*0*/ s: kotlin.String)
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -8,7 +8,7 @@ public open platform class A {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final platform class B : A {
|
||||
public final header class B : A {
|
||||
public constructor B()
|
||||
public constructor B(/*0*/ i: kotlin.Int)
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
Vendored
+11
-11
@@ -1,18 +1,18 @@
|
||||
// !DIAGNOSTICS: -PLATFORM_DEFINITION_WITHOUT_DECLARATION
|
||||
// !DIAGNOSTICS: -IMPLEMENTATION_WITHOUT_HEADER
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
platform class C1
|
||||
platform class C2<A>
|
||||
platform class C3<B>
|
||||
platform class C4<D, E>
|
||||
platform class C5<F, G>
|
||||
platform class C6<H>
|
||||
platform class C7<I>
|
||||
platform class C8<J>
|
||||
platform class C9<K>
|
||||
platform class C10<L>
|
||||
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>
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
Vendored
+10
-10
@@ -1,70 +1,70 @@
|
||||
// -- Module: <m1-common> --
|
||||
package
|
||||
|
||||
public final platform class C1 {
|
||||
public final header class C1 {
|
||||
public constructor C1()
|
||||
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 final platform class C10</*0*/ L> {
|
||||
public final header class C10</*0*/ L> {
|
||||
public constructor C10</*0*/ L>()
|
||||
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 final platform class C2</*0*/ A> {
|
||||
public final header class C2</*0*/ A> {
|
||||
public constructor C2</*0*/ 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*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final platform class C3</*0*/ B> {
|
||||
public final header class C3</*0*/ B> {
|
||||
public constructor C3</*0*/ 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*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final platform class C4</*0*/ D, /*1*/ E> {
|
||||
public final header class C4</*0*/ D, /*1*/ E> {
|
||||
public constructor C4</*0*/ D, /*1*/ 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 open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final platform class C5</*0*/ F, /*1*/ G> {
|
||||
public final header class C5</*0*/ F, /*1*/ G> {
|
||||
public constructor C5</*0*/ F, /*1*/ G>()
|
||||
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 final platform class C6</*0*/ H> {
|
||||
public final header class C6</*0*/ H> {
|
||||
public constructor C6</*0*/ H>()
|
||||
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 final platform class C7</*0*/ I> {
|
||||
public final header class C7</*0*/ I> {
|
||||
public constructor C7</*0*/ I>()
|
||||
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 final platform class C8</*0*/ J> {
|
||||
public final header class C8</*0*/ J> {
|
||||
public constructor C8</*0*/ J>()
|
||||
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 final platform class C9</*0*/ K> {
|
||||
public final header class C9</*0*/ K> {
|
||||
public constructor C9</*0*/ K>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
platform class Foo {
|
||||
header class Foo {
|
||||
val foo: String
|
||||
|
||||
fun bar(x: Int): Int
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
// -- Module: <m1-common> --
|
||||
package
|
||||
|
||||
public final platform class Foo {
|
||||
public final header class Foo {
|
||||
public constructor Foo()
|
||||
public final val foo: kotlin.String
|
||||
public final platform fun bar(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
public final header 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
|
||||
|
||||
Vendored
+10
-10
@@ -1,29 +1,29 @@
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
platform class Foo(
|
||||
<!PLATFORM_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER!>val constructorProperty: String<!>,
|
||||
header class Foo(
|
||||
<!HEADER_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER!>val constructorProperty: String<!>,
|
||||
constructorParameter: String
|
||||
) {
|
||||
<!PLATFORM_DECLARATION_WITH_BODY!>init<!> {
|
||||
<!HEADER_DECLARATION_WITH_BODY!>init<!> {
|
||||
<!UNUSED_EXPRESSION, UNUSED_EXPRESSION!>"no"<!>
|
||||
}
|
||||
|
||||
<!PLATFORM_DECLARATION_WITH_BODY!>constructor(s: String)<!> {
|
||||
<!HEADER_DECLARATION_WITH_BODY!>constructor(s: String)<!> {
|
||||
<!UNUSED_EXPRESSION!>"no"<!>
|
||||
}
|
||||
|
||||
constructor() : <!PLATFORM_CLASS_CONSTRUCTOR_DELEGATION_CALL!>this<!>("no")
|
||||
constructor() : <!HEADER_CLASS_CONSTRUCTOR_DELEGATION_CALL!>this<!>("no")
|
||||
|
||||
val prop: String = <!PLATFORM_PROPERTY_INITIALIZER!>"no"<!>
|
||||
val prop: String = <!HEADER_PROPERTY_INITIALIZER!>"no"<!>
|
||||
|
||||
var getSet: String
|
||||
<!PLATFORM_DECLARATION_WITH_BODY!>get()<!> = "no"
|
||||
<!PLATFORM_DECLARATION_WITH_BODY!>set(value)<!> {}
|
||||
<!HEADER_DECLARATION_WITH_BODY!>get()<!> = "no"
|
||||
<!HEADER_DECLARATION_WITH_BODY!>set(value)<!> {}
|
||||
|
||||
fun defaultArg(<!PLATFORM_DECLARATION_WITH_DEFAULT_PARAMETER!>value: String = "no"<!>)
|
||||
fun defaultArg(<!HEADER_DECLARATION_WITH_DEFAULT_PARAMETER!>value: String = "no"<!>)
|
||||
|
||||
<!PLATFORM_DECLARATION_WITH_BODY!>fun functionWithBody(x: Int): Int<!> {
|
||||
<!HEADER_DECLARATION_WITH_BODY!>fun functionWithBody(x: Int): Int<!> {
|
||||
return x + 1
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -1,15 +1,15 @@
|
||||
package
|
||||
|
||||
public final platform class Foo {
|
||||
public final header class Foo {
|
||||
public constructor Foo()
|
||||
public constructor Foo(/*0*/ s: kotlin.String)
|
||||
public constructor Foo(/*0*/ constructorProperty: kotlin.String, /*1*/ constructorParameter: kotlin.String)
|
||||
public final val constructorProperty: kotlin.String
|
||||
public final var getSet: kotlin.String
|
||||
public final val prop: kotlin.String = "no"
|
||||
public final platform fun defaultArg(/*0*/ value: kotlin.String = ...): kotlin.Unit
|
||||
public final header fun defaultArg(/*0*/ value: kotlin.String = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final platform fun functionWithBody(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
public final header fun functionWithBody(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
platform class Foo
|
||||
header class Foo
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// -- Module: <m1-common> --
|
||||
package
|
||||
|
||||
public final platform class Foo {
|
||||
public final header 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
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ interface I
|
||||
open class C
|
||||
interface J
|
||||
|
||||
platform class Foo : I, C, J
|
||||
header class Foo : I, C, J
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ public open class C {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final platform class Foo : I, C, J {
|
||||
public final header 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
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
platform fun foo(x: Int): Int
|
||||
header fun foo(x: Int): Int
|
||||
|
||||
fun callFromCommonCode(x: Int) = foo(x)
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
package
|
||||
|
||||
public fun callFromCommonCode(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
public platform fun foo(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
public header fun foo(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
|
||||
|
||||
// -- Module: <m2-jvm> --
|
||||
|
||||
Vendored
+3
-3
@@ -2,7 +2,7 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>platform fun foo()<!>
|
||||
<!CONFLICTING_OVERLOADS!>platform fun foo()<!>
|
||||
<!CONFLICTING_OVERLOADS!>header fun foo()<!>
|
||||
<!CONFLICTING_OVERLOADS!>header fun foo()<!>
|
||||
|
||||
platform fun foo(x: Int)
|
||||
header fun foo(x: Int)
|
||||
|
||||
Vendored
+3
-3
@@ -1,5 +1,5 @@
|
||||
package
|
||||
|
||||
public platform fun foo(): kotlin.Unit
|
||||
public platform fun foo(): kotlin.Unit
|
||||
public platform fun foo(/*0*/ x: kotlin.Int): kotlin.Unit
|
||||
public header fun foo(): kotlin.Unit
|
||||
public header fun foo(): kotlin.Unit
|
||||
public header fun foo(/*0*/ x: kotlin.Int): kotlin.Unit
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
platform fun foo()
|
||||
header fun foo()
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
// -- Module: <m1-common> --
|
||||
package
|
||||
|
||||
public platform fun foo(): kotlin.Unit
|
||||
public header fun foo(): kotlin.Unit
|
||||
|
||||
|
||||
// -- Module: <m2-jvm> --
|
||||
|
||||
+3
-3
@@ -3,16 +3,16 @@
|
||||
// FILE: common.kt
|
||||
package common
|
||||
|
||||
platform fun foo()
|
||||
header fun foo()
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
package jvm
|
||||
|
||||
<!PLATFORM_DEFINITION_WITHOUT_DECLARATION!>impl<!> fun foo() {}
|
||||
<!IMPLEMENTATION_WITHOUT_HEADER!>impl<!> fun foo() {}
|
||||
|
||||
// MODULE: m3-js(m1-common)
|
||||
// FILE: js.kt
|
||||
package js
|
||||
|
||||
<!PLATFORM_DEFINITION_WITHOUT_DECLARATION!>impl<!> fun foo() {}
|
||||
<!IMPLEMENTATION_WITHOUT_HEADER!>impl<!> fun foo() {}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
package
|
||||
|
||||
package common {
|
||||
public platform fun foo(): kotlin.Unit
|
||||
public header fun foo(): kotlin.Unit
|
||||
}
|
||||
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -2,4 +2,4 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
platform fun foo()
|
||||
header fun foo()
|
||||
|
||||
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
||||
package
|
||||
|
||||
public platform fun foo(): kotlin.Unit
|
||||
public header fun foo(): kotlin.Unit
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
platform fun foo(x: Int, <!PLATFORM_DECLARATION_WITH_DEFAULT_PARAMETER!>y: String = ""<!>)
|
||||
header fun foo(x: Int, <!HEADER_DECLARATION_WITH_DEFAULT_PARAMETER!>y: String = ""<!>)
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package
|
||||
|
||||
public platform fun foo(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.String = ...): kotlin.Unit
|
||||
public header fun foo(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.String = ...): kotlin.Unit
|
||||
|
||||
Vendored
+1
-1
@@ -2,4 +2,4 @@
|
||||
// MODULE: m1-jvm
|
||||
// FILE: jvm.kt
|
||||
|
||||
<!PLATFORM_DEFINITION_WITHOUT_DECLARATION!>impl<!> fun foo() { }
|
||||
<!IMPLEMENTATION_WITHOUT_HEADER!>impl<!> fun foo() { }
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
inline platform fun inlineFun()
|
||||
platform fun nonInlineFun()
|
||||
inline header fun inlineFun()
|
||||
header fun nonInlineFun()
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
<!PLATFORM_DEFINITION_WITHOUT_DECLARATION!>impl<!> fun inlineFun() { }
|
||||
<!IMPLEMENTATION_WITHOUT_HEADER!>impl<!> fun inlineFun() { }
|
||||
impl fun nonInlineFun() { }
|
||||
|
||||
// MODULE: m3-js(m1-common)
|
||||
// FILE: js.kt
|
||||
|
||||
impl <!NOTHING_TO_INLINE!>inline<!> fun inlineFun() { }
|
||||
<!PLATFORM_DEFINITION_WITHOUT_DECLARATION!>impl<!> <!NOTHING_TO_INLINE!>inline<!> fun nonInlineFun() { }
|
||||
<!IMPLEMENTATION_WITHOUT_HEADER!>impl<!> <!NOTHING_TO_INLINE!>inline<!> fun nonInlineFun() { }
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// -- Module: <m1-common> --
|
||||
package
|
||||
|
||||
public inline platform fun inlineFun(): kotlin.Unit
|
||||
public platform fun nonInlineFun(): kotlin.Unit
|
||||
public inline header fun inlineFun(): kotlin.Unit
|
||||
public header fun nonInlineFun(): kotlin.Unit
|
||||
|
||||
|
||||
// -- Module: <m2-jvm> --
|
||||
|
||||
Vendored
+3
-3
@@ -2,8 +2,8 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>platform fun foo()<!>
|
||||
<!CONFLICTING_OVERLOADS!>header fun foo()<!>
|
||||
|
||||
<!CONFLICTING_OVERLOADS, PLATFORM_DECLARATION_WITH_BODY!>platform fun foo()<!> {}
|
||||
<!CONFLICTING_OVERLOADS, HEADER_DECLARATION_WITH_BODY!>header fun foo()<!> {}
|
||||
|
||||
<!PLATFORM_DECLARATION_WITH_BODY!>platform fun bar()<!> {}
|
||||
<!HEADER_DECLARATION_WITH_BODY!>header fun bar()<!> {}
|
||||
|
||||
Vendored
+3
-3
@@ -1,5 +1,5 @@
|
||||
package
|
||||
|
||||
public platform fun bar(): kotlin.Unit
|
||||
public platform fun foo(): kotlin.Unit
|
||||
public platform fun foo(): kotlin.Unit
|
||||
public header fun bar(): kotlin.Unit
|
||||
public header fun foo(): kotlin.Unit
|
||||
public header fun foo(): kotlin.Unit
|
||||
|
||||
Vendored
+2
-2
@@ -2,11 +2,11 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
platform fun foo()
|
||||
header fun foo()
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
<!NON_MEMBER_FUNCTION_NO_BODY!>impl fun foo()<!>
|
||||
|
||||
<!NON_MEMBER_FUNCTION_NO_BODY!><!PLATFORM_DEFINITION_WITHOUT_DECLARATION!>impl<!> fun bar()<!>
|
||||
<!NON_MEMBER_FUNCTION_NO_BODY!><!IMPLEMENTATION_WITHOUT_HEADER!>impl<!> fun bar()<!>
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
// -- Module: <m1-common> --
|
||||
package
|
||||
|
||||
public platform fun foo(): kotlin.Unit
|
||||
public header fun foo(): kotlin.Unit
|
||||
|
||||
|
||||
// -- Module: <m2-jvm> --
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
platform fun foo()
|
||||
header fun foo()
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// -- Module: <m1-common> --
|
||||
package
|
||||
|
||||
public platform fun foo(): kotlin.Unit
|
||||
public header fun foo(): kotlin.Unit
|
||||
|
||||
|
||||
// -- Module: <m2-jvm> --
|
||||
|
||||
Vendored
+20
-20
@@ -2,39 +2,39 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
platform val justVal: String
|
||||
platform var justVar: String
|
||||
header val justVal: String
|
||||
header var justVar: String
|
||||
|
||||
platform val String.extensionVal: Unit
|
||||
platform var <T> T.genericExtensionVar: T
|
||||
header val String.extensionVal: Unit
|
||||
header var <T> T.genericExtensionVar: T
|
||||
|
||||
platform val valWithGet: String
|
||||
header val valWithGet: String
|
||||
get
|
||||
platform var varWithGetSet: String
|
||||
header var varWithGetSet: String
|
||||
get set
|
||||
|
||||
platform var varWithPlatformGetSet: String
|
||||
<!WRONG_MODIFIER_TARGET!>platform<!> get
|
||||
<!WRONG_MODIFIER_TARGET!>platform<!> set
|
||||
header var varWithPlatformGetSet: String
|
||||
<!WRONG_MODIFIER_TARGET!>header<!> get
|
||||
<!WRONG_MODIFIER_TARGET!>header<!> set
|
||||
|
||||
platform val backingFieldVal: String = <!PLATFORM_PROPERTY_INITIALIZER!>"no"<!>
|
||||
platform var backingFieldVar: String = <!PLATFORM_PROPERTY_INITIALIZER!>"no"<!>
|
||||
header val backingFieldVal: String = <!HEADER_PROPERTY_INITIALIZER!>"no"<!>
|
||||
header var backingFieldVar: String = <!HEADER_PROPERTY_INITIALIZER!>"no"<!>
|
||||
|
||||
platform val customAccessorVal: String
|
||||
<!PLATFORM_DECLARATION_WITH_BODY!>get()<!> = "no"
|
||||
platform var customAccessorVar: String
|
||||
<!PLATFORM_DECLARATION_WITH_BODY!>get()<!> = "no"
|
||||
<!PLATFORM_DECLARATION_WITH_BODY!>set(value)<!> {}
|
||||
header val customAccessorVal: String
|
||||
<!HEADER_DECLARATION_WITH_BODY!>get()<!> = "no"
|
||||
header var customAccessorVar: String
|
||||
<!HEADER_DECLARATION_WITH_BODY!>get()<!> = "no"
|
||||
<!HEADER_DECLARATION_WITH_BODY!>set(value)<!> {}
|
||||
|
||||
platform <!CONST_VAL_WITHOUT_INITIALIZER!>const<!> val constVal: Int
|
||||
header <!CONST_VAL_WITHOUT_INITIALIZER!>const<!> val constVal: Int
|
||||
|
||||
platform <!WRONG_MODIFIER_TARGET!>lateinit<!> var lateinitVar: String
|
||||
header <!WRONG_MODIFIER_TARGET!>lateinit<!> var lateinitVar: String
|
||||
|
||||
<!WRONG_MODIFIER_TARGET!>platform<!> val delegated: String by Delegate
|
||||
<!WRONG_MODIFIER_TARGET!>header<!> val delegated: String by Delegate
|
||||
object Delegate { operator fun getValue(x: Any?, y: Any?): String = "" }
|
||||
|
||||
fun test(): String {
|
||||
<!WRONG_MODIFIER_TARGET!>platform<!> val localVariable: String
|
||||
<!WRONG_MODIFIER_TARGET!>header<!> val localVariable: String
|
||||
localVariable = "no"
|
||||
return localVariable
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
platform var foo: String
|
||||
header var foo: String
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
<!UNSUPPORTED_FEATURE!>platform<!> fun foo1()
|
||||
<!UNSUPPORTED_FEATURE!>platform<!> val bar1 = <!PLATFORM_PROPERTY_INITIALIZER!>42<!>
|
||||
<!UNSUPPORTED_FEATURE!>platform<!> class Baz1
|
||||
<!UNSUPPORTED_FEATURE!>header<!> fun foo1()
|
||||
<!UNSUPPORTED_FEATURE!>header<!> val bar1 = <!HEADER_PROPERTY_INITIALIZER!>42<!>
|
||||
<!UNSUPPORTED_FEATURE!>header<!> class Baz1
|
||||
|
||||
<!UNSUPPORTED_FEATURE!>impl<!> fun foo2() = 42
|
||||
<!MUST_BE_INITIALIZED!><!UNSUPPORTED_FEATURE!>impl<!> val bar2: Int<!>
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
platform class Foo {
|
||||
header class Foo {
|
||||
constructor(s: String)
|
||||
}
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/classScopes/constructorIncorrectSignature/common.kt:1:16: error: no definition is found for platform declaration 'Foo'
|
||||
compiler/testData/multiplatform/classScopes/constructorIncorrectSignature/common.kt:1:14: error: no implementation is found for header declaration 'Foo'
|
||||
The following declaration is incompatible because some members are not implemented.
|
||||
No implementations are found for members listed below:
|
||||
|
||||
@@ -14,8 +14,8 @@ No implementations are found for members listed below:
|
||||
The following declaration is incompatible because parameter types are different:
|
||||
public constructor Foo(s: Array<String>)
|
||||
|
||||
platform class Foo {
|
||||
^
|
||||
header class Foo {
|
||||
^
|
||||
compiler/testData/multiplatform/classScopes/constructorIncorrectSignature/jvm.kt:1:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||
impl class Foo {
|
||||
^
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
platform open class Base {
|
||||
header open class Base {
|
||||
fun base()
|
||||
}
|
||||
|
||||
platform class Derived : Base {
|
||||
header class Derived : Base {
|
||||
fun derived()
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
platform class Foo {
|
||||
header class Foo {
|
||||
fun function(b: ByteArray): Int
|
||||
}
|
||||
|
||||
+4
-4
@@ -5,17 +5,17 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/classScopes/functionIncorrectSignature/common.kt:1:16: error: no definition is found for platform declaration 'Foo'
|
||||
compiler/testData/multiplatform/classScopes/functionIncorrectSignature/common.kt:1:14: error: no implementation is found for header declaration 'Foo'
|
||||
The following declaration is incompatible because some members are not implemented.
|
||||
No implementations are found for members listed below:
|
||||
|
||||
public final platform fun function(b: ByteArray): Int
|
||||
public final header fun function(b: ByteArray): Int
|
||||
|
||||
The following declaration is incompatible because return type is different:
|
||||
public final impl fun function(b: ByteArray): Long
|
||||
|
||||
platform class Foo {
|
||||
^
|
||||
header class Foo {
|
||||
^
|
||||
compiler/testData/multiplatform/classScopes/functionIncorrectSignature/jvm.kt:1:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||
impl class Foo {
|
||||
^
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
platform class Foo {
|
||||
header class Foo {
|
||||
constructor(s: String)
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/classScopes/missingConstructor/common.kt:1:16: error: no definition is found for platform declaration 'Foo'
|
||||
compiler/testData/multiplatform/classScopes/missingConstructor/common.kt:1:14: error: no implementation is found for header declaration 'Foo'
|
||||
The following declaration is incompatible because some members are not implemented.
|
||||
No implementations are found for members listed below:
|
||||
|
||||
@@ -14,8 +14,8 @@ No implementations are found for members listed below:
|
||||
The following declaration is incompatible because number of value parameters is different:
|
||||
public constructor Foo()
|
||||
|
||||
platform class Foo {
|
||||
^
|
||||
header class Foo {
|
||||
^
|
||||
compiler/testData/multiplatform/classScopes/missingConstructor/jvm.kt:1:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||
impl class Foo
|
||||
^
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
platform class Foo {
|
||||
header class Foo {
|
||||
fun function(s: String)
|
||||
}
|
||||
|
||||
@@ -5,14 +5,14 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/classScopes/missingFunction/common.kt:1:16: error: no definition is found for platform declaration 'Foo'
|
||||
compiler/testData/multiplatform/classScopes/missingFunction/common.kt:1:14: error: no implementation is found for header declaration 'Foo'
|
||||
The following declaration is incompatible because some members are not implemented.
|
||||
No implementations are found for members listed below:
|
||||
|
||||
public final platform fun function(s: String): Unit
|
||||
public final header fun function(s: String): Unit
|
||||
|
||||
platform class Foo {
|
||||
^
|
||||
header class Foo {
|
||||
^
|
||||
compiler/testData/multiplatform/classScopes/missingFunction/jvm.kt:1:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||
impl class Foo
|
||||
^
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
platform class Foo(param: String) {
|
||||
header class Foo(param: String) {
|
||||
var property: Int
|
||||
|
||||
fun <T> function(p: List<T>): T
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
platform fun <T> f1(): T
|
||||
header fun <T> f1(): T
|
||||
|
||||
platform fun <T> f2(t: T)
|
||||
header fun <T> f2(t: T)
|
||||
|
||||
platform fun <K : Enum<K>, V : MutableList<out K>> f3(v: Map<V, Enum<in K>>, w: Comparable<*>)
|
||||
header fun <K : Enum<K>, V : MutableList<out K>> f3(v: Map<V, Enum<in K>>, w: Comparable<*>)
|
||||
|
||||
platform fun <T: Comparable<T>> Array<out T>.sort(): Unit
|
||||
header fun <T: Comparable<T>> Array<out T>.sort(): Unit
|
||||
|
||||
platform class C1<A>
|
||||
platform class C2<B : C2<B>>
|
||||
platform class C3<D, E : MutableList<in D>>
|
||||
header class C1<A>
|
||||
header class C2<B : C2<B>>
|
||||
header class C3<D, E : MutableList<in D>>
|
||||
|
||||
platform abstract class AbstractList<F> : MutableList<F>
|
||||
header abstract class AbstractList<F> : MutableList<F>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
platform class C1<A> {
|
||||
header class C1<A> {
|
||||
fun foo(a: A): List<A>?
|
||||
}
|
||||
|
||||
+25
-25
@@ -1,36 +1,36 @@
|
||||
platform fun f1()
|
||||
header fun f1()
|
||||
|
||||
platform fun f2(name: String)
|
||||
header fun f2(name: String)
|
||||
|
||||
platform fun f3(name: String)
|
||||
platform fun String.f3ext()
|
||||
header fun f3(name: String)
|
||||
header fun String.f3ext()
|
||||
|
||||
platform fun f4(name: String)
|
||||
header fun f4(name: String)
|
||||
|
||||
platform fun String.f5()
|
||||
header fun String.f5()
|
||||
|
||||
platform fun f6(p1: String, p2: Int)
|
||||
header fun f6(p1: String, p2: Int)
|
||||
|
||||
platform fun <T> f7()
|
||||
header fun <T> f7()
|
||||
|
||||
internal platform fun f8()
|
||||
private platform fun f9()
|
||||
public platform fun f10()
|
||||
internal header fun f8()
|
||||
private header fun f9()
|
||||
public header fun f10()
|
||||
|
||||
platform fun <T : Number> f11()
|
||||
platform fun <U : MutableList<String>> f12()
|
||||
platform fun <A, B : Continuation<A>> f13()
|
||||
header fun <T : Number> f11()
|
||||
header fun <U : MutableList<String>> f12()
|
||||
header fun <A, B : Continuation<A>> f13()
|
||||
|
||||
platform inline fun <X> f14()
|
||||
platform inline fun <reified Y> f15()
|
||||
header inline fun <X> f14()
|
||||
header inline fun <reified Y> f15()
|
||||
|
||||
platform fun f16(s: String)
|
||||
header fun f16(s: String)
|
||||
|
||||
platform fun f17(vararg s: String)
|
||||
platform fun f18(s: Array<out String>)
|
||||
platform inline fun f19(crossinline s: () -> Unit)
|
||||
platform inline fun f20(s: () -> Unit)
|
||||
platform inline fun f21(noinline s: () -> Unit)
|
||||
platform inline fun f22(s: () -> Unit)
|
||||
platform fun f23(coroutine c: Unit.() -> Continuation<Unit>)
|
||||
platform fun f24(c: Unit.() -> Continuation<Unit>)
|
||||
header fun f17(vararg s: String)
|
||||
header fun f18(s: Array<out String>)
|
||||
header inline fun f19(crossinline s: () -> Unit)
|
||||
header inline fun f20(s: () -> Unit)
|
||||
header inline fun f21(noinline s: () -> Unit)
|
||||
header inline fun f22(s: () -> Unit)
|
||||
header fun f23(coroutine c: Unit.() -> Continuation<Unit>)
|
||||
header fun f24(c: Unit.() -> Continuation<Unit>)
|
||||
|
||||
@@ -5,137 +5,137 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:1:1: error: no definition is found for platform declaration 'f1'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:1:1: error: no implementation is found for header declaration 'f1'
|
||||
The following declaration is incompatible because return type is different:
|
||||
public impl fun f1(): String
|
||||
|
||||
platform fun f1()
|
||||
header fun f1()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:3:1: error: no definition is found for platform declaration 'f2'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:3:1: error: no implementation is found for header declaration 'f2'
|
||||
The following declaration is incompatible because parameter names are different:
|
||||
public impl fun f2(otherName: String): Unit
|
||||
|
||||
platform fun f2(name: String)
|
||||
header fun f2(name: String)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:5:1: error: no definition is found for platform declaration 'f3'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:5:1: error: no implementation is found for header declaration 'f3'
|
||||
The following declaration is incompatible because parameter types are different:
|
||||
public impl fun f3(name: Double): Unit
|
||||
|
||||
platform fun f3(name: String)
|
||||
header fun f3(name: String)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:6:1: error: no definition is found for platform declaration 'f3ext'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:6:1: error: no implementation is found for header declaration 'f3ext'
|
||||
The following declaration is incompatible because parameter types are different:
|
||||
public impl fun Double.f3ext(): Unit
|
||||
|
||||
platform fun String.f3ext()
|
||||
header fun String.f3ext()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:8:1: error: no definition is found for platform declaration 'f4'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:8:1: error: no implementation is found for header declaration 'f4'
|
||||
The following declaration is incompatible because parameter shapes are different (extension vs non-extension):
|
||||
public impl fun String.f4(): Unit
|
||||
|
||||
platform fun f4(name: String)
|
||||
header fun f4(name: String)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:10:1: error: no definition is found for platform declaration 'f5'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:10:1: error: no implementation is found for header declaration 'f5'
|
||||
The following declaration is incompatible because parameter shapes are different (extension vs non-extension):
|
||||
public impl fun f5(name: String): Unit
|
||||
|
||||
platform fun String.f5()
|
||||
header fun String.f5()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:12:1: error: no definition is found for platform declaration 'f6'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:12:1: error: no implementation is found for header declaration 'f6'
|
||||
The following declaration is incompatible because number of value parameters is different:
|
||||
public impl fun f6(p2: Int): Unit
|
||||
|
||||
platform fun f6(p1: String, p2: Int)
|
||||
header fun f6(p1: String, p2: Int)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:14:1: error: no definition is found for platform declaration 'f7'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:14:1: error: no implementation is found for header declaration 'f7'
|
||||
The following declaration is incompatible because number of type parameters is different:
|
||||
public impl fun <K, V> f7(): Unit
|
||||
|
||||
platform fun <T> f7()
|
||||
header fun <T> f7()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:16:1: error: no definition is found for platform declaration 'f8'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:16:1: error: no implementation is found for header declaration 'f8'
|
||||
The following declaration is incompatible because visibility is different:
|
||||
public impl fun f8(): Unit
|
||||
|
||||
internal platform fun f8()
|
||||
internal header fun f8()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:17:1: error: no definition is found for platform declaration 'f9'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:17:1: error: no implementation is found for header declaration 'f9'
|
||||
The following declaration is incompatible because visibility is different:
|
||||
internal impl fun f9(): Unit
|
||||
|
||||
private platform fun f9()
|
||||
private header fun f9()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:18:1: error: no definition is found for platform declaration 'f10'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:18:1: error: no implementation is found for header declaration 'f10'
|
||||
The following declaration is incompatible because visibility is different:
|
||||
private impl fun f10(): Unit
|
||||
|
||||
public platform fun f10()
|
||||
public header fun f10()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:24:1: error: no definition is found for platform declaration 'f14'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:24:1: error: no implementation is found for header declaration 'f14'
|
||||
The following declaration is incompatible because some type parameter is reified in one declaration and non-reified in the other:
|
||||
public inline impl fun <reified X> f14(): Unit
|
||||
|
||||
platform inline fun <X> f14()
|
||||
header inline fun <X> f14()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:25:1: error: no definition is found for platform declaration 'f15'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:25:1: error: no implementation is found for header declaration 'f15'
|
||||
The following declaration is incompatible because some type parameter is reified in one declaration and non-reified in the other:
|
||||
public inline impl fun <Y> f15(): Unit
|
||||
|
||||
platform inline fun <reified Y> f15()
|
||||
header inline fun <reified Y> f15()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:27:1: error: no definition is found for platform declaration 'f16'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:27:1: error: no implementation is found for header declaration 'f16'
|
||||
The following declaration is incompatible because some parameters have default values:
|
||||
public impl fun f16(s: String = ...): Unit
|
||||
|
||||
platform fun f16(s: String)
|
||||
header fun f16(s: String)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:29:1: error: no definition is found for platform declaration 'f17'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:29:1: error: no implementation is found for header declaration 'f17'
|
||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||
public impl fun f17(s: Array<out String>): Unit
|
||||
|
||||
platform fun f17(vararg s: String)
|
||||
header fun f17(vararg s: String)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:30:1: error: no definition is found for platform declaration 'f18'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:30:1: error: no implementation is found for header declaration 'f18'
|
||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||
public impl fun f18(vararg s: String): Unit
|
||||
|
||||
platform fun f18(s: Array<out String>)
|
||||
header fun f18(s: Array<out String>)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:31:1: error: no definition is found for platform declaration 'f19'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:31:1: error: no implementation is found for header declaration 'f19'
|
||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||
public inline impl fun f19(s: () -> Unit): Unit
|
||||
|
||||
platform inline fun f19(crossinline s: () -> Unit)
|
||||
header inline fun f19(crossinline s: () -> Unit)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:32:1: error: no definition is found for platform declaration 'f20'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:32:1: error: no implementation is found for header declaration 'f20'
|
||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||
public inline impl fun f20(crossinline s: () -> Unit): Unit
|
||||
|
||||
platform inline fun f20(s: () -> Unit)
|
||||
header inline fun f20(s: () -> Unit)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:33:1: error: no definition is found for platform declaration 'f21'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:33:1: error: no implementation is found for header declaration 'f21'
|
||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||
public inline impl fun f21(s: () -> Unit): Unit
|
||||
|
||||
platform inline fun f21(noinline s: () -> Unit)
|
||||
header inline fun f21(noinline s: () -> Unit)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:34:1: error: no definition is found for platform declaration 'f22'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:34:1: error: no implementation is found for header declaration 'f22'
|
||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||
public inline impl fun f22(noinline s: () -> Unit): Unit
|
||||
|
||||
platform inline fun f22(s: () -> Unit)
|
||||
header inline fun f22(s: () -> Unit)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:35:1: error: no definition is found for platform declaration 'f23'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:35:1: error: no implementation is found for header declaration 'f23'
|
||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||
public impl fun f23(c: Unit.() -> Continuation<Unit>): Unit
|
||||
|
||||
platform fun f23(coroutine c: Unit.() -> Continuation<Unit>)
|
||||
header fun f23(coroutine c: Unit.() -> Continuation<Unit>)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:36:1: error: no definition is found for platform declaration 'f24'
|
||||
compiler/testData/multiplatform/incompatibleCallables/common.kt:36:1: error: no implementation is found for header declaration 'f24'
|
||||
The following declaration is incompatible because parameter modifiers are different (vararg, coroutine, crossinline, noinline):
|
||||
public impl fun f24(coroutine c: Unit.() -> Continuation<Unit>): Unit
|
||||
|
||||
platform fun f24(c: Unit.() -> Continuation<Unit>)
|
||||
header fun f24(c: Unit.() -> Continuation<Unit>)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleCallables/jvm.kt:1:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||
impl fun f1(): String = ""
|
||||
|
||||
+18
-18
@@ -1,25 +1,25 @@
|
||||
platform class PClass
|
||||
platform interface PInterface
|
||||
platform object PObject
|
||||
platform enum class PEnumClass
|
||||
platform annotation class PAnnotationClass
|
||||
header class PClass
|
||||
header interface PInterface
|
||||
header object PObject
|
||||
header enum class PEnumClass
|
||||
header annotation class PAnnotationClass
|
||||
|
||||
internal platform object InternalObject
|
||||
public platform object PublicObject
|
||||
private platform object PrivateObject
|
||||
internal header object InternalObject
|
||||
public header object PublicObject
|
||||
private header object PrivateObject
|
||||
|
||||
open platform class OpenClass
|
||||
abstract platform class AbstractClass
|
||||
final platform class FinalClass
|
||||
open header class OpenClass
|
||||
abstract header class AbstractClass
|
||||
final header class FinalClass
|
||||
|
||||
// platform data class DataClass(val x: Int)
|
||||
platform class NonDataClass(x: Int)
|
||||
// header data class DataClass(val x: Int)
|
||||
header class NonDataClass(x: Int)
|
||||
|
||||
platform class C1<A>
|
||||
platform class C2<B>
|
||||
platform class C3<D, E : D>
|
||||
header class C1<A>
|
||||
header class C2<B>
|
||||
header class C3<D, E : D>
|
||||
|
||||
platform class C4<F>
|
||||
header class C4<F>
|
||||
|
||||
|
||||
platform abstract class ExtendsNumber : Number
|
||||
header abstract class ExtendsNumber : Number
|
||||
|
||||
+45
-45
@@ -5,96 +5,96 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:1:16: error: no definition is found for platform declaration 'PClass'
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:1:14: error: no implementation is found for header declaration 'PClass'
|
||||
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
||||
public impl interface PClass
|
||||
|
||||
platform class PClass
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:2:20: error: no definition is found for platform declaration 'PInterface'
|
||||
header class PClass
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:2:18: error: no implementation is found for header declaration 'PInterface'
|
||||
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
||||
public impl object PInterface
|
||||
|
||||
platform interface PInterface
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:3:10: error: no definition is found for platform declaration 'PObject'
|
||||
header interface PInterface
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:3:8: error: no implementation is found for header declaration 'PObject'
|
||||
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
||||
public final impl enum class PObject : Enum<PObject>
|
||||
|
||||
platform object PObject
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:4:21: error: no definition is found for platform declaration 'PEnumClass'
|
||||
header object PObject
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:4:19: error: no implementation is found for header declaration 'PEnumClass'
|
||||
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
||||
public final impl annotation class PEnumClass : Annotation
|
||||
|
||||
platform enum class PEnumClass
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:5:27: error: no definition is found for platform declaration 'PAnnotationClass'
|
||||
header enum class PEnumClass
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:5:25: error: no implementation is found for header declaration 'PAnnotationClass'
|
||||
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
||||
public final impl class PAnnotationClass
|
||||
|
||||
platform annotation class PAnnotationClass
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:7:19: error: no definition is found for platform declaration 'InternalObject'
|
||||
header annotation class PAnnotationClass
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:7:17: error: no implementation is found for header declaration 'InternalObject'
|
||||
The following declaration is incompatible because visibility is different:
|
||||
private impl object InternalObject
|
||||
|
||||
internal platform object InternalObject
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:8:17: error: no definition is found for platform declaration 'PublicObject'
|
||||
internal header object InternalObject
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:8:15: error: no implementation is found for header declaration 'PublicObject'
|
||||
The following declaration is incompatible because visibility is different:
|
||||
internal impl object PublicObject
|
||||
|
||||
public platform object PublicObject
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:9:18: error: no definition is found for platform declaration 'PrivateObject'
|
||||
public header object PublicObject
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:9:16: error: no implementation is found for header declaration 'PrivateObject'
|
||||
The following declaration is incompatible because visibility is different:
|
||||
public impl object PrivateObject
|
||||
|
||||
private platform object PrivateObject
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:11:21: error: no definition is found for platform declaration 'OpenClass'
|
||||
private header object PrivateObject
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:11:19: error: no implementation is found for header declaration 'OpenClass'
|
||||
The following declaration is incompatible because modality is different:
|
||||
public final impl class OpenClass
|
||||
|
||||
open platform class OpenClass
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:12:25: error: no definition is found for platform declaration 'AbstractClass'
|
||||
open header class OpenClass
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:12:23: error: no implementation is found for header declaration 'AbstractClass'
|
||||
The following declaration is incompatible because modality is different:
|
||||
public open impl class AbstractClass
|
||||
|
||||
abstract platform class AbstractClass
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:13:22: error: no definition is found for platform declaration 'FinalClass'
|
||||
abstract header class AbstractClass
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:13:20: error: no implementation is found for header declaration 'FinalClass'
|
||||
The following declaration is incompatible because modality is different:
|
||||
public abstract impl class FinalClass
|
||||
|
||||
final platform class FinalClass
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:16:16: error: no definition is found for platform declaration 'NonDataClass'
|
||||
final header class FinalClass
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:16:14: error: no implementation is found for header declaration 'NonDataClass'
|
||||
The following declaration is incompatible because modifiers are different (data):
|
||||
public final impl data class NonDataClass
|
||||
|
||||
platform class NonDataClass(x: Int)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:18:16: error: no definition is found for platform declaration 'C1'
|
||||
header class NonDataClass(x: Int)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:18:14: error: no implementation is found for header declaration 'C1'
|
||||
The following declaration is incompatible because number of type parameters is different:
|
||||
public final impl class C1<A, Extra>
|
||||
|
||||
platform class C1<A>
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:19:16: error: no definition is found for platform declaration 'C2'
|
||||
header class C1<A>
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:19:14: error: no implementation is found for header declaration 'C2'
|
||||
The following declaration is incompatible because declaration-site variances of type parameters are different:
|
||||
public final impl class C2<out B>
|
||||
|
||||
platform class C2<B>
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:25:25: error: no definition is found for platform declaration 'ExtendsNumber'
|
||||
header class C2<B>
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/common.kt:25:23: error: no implementation is found for header declaration 'ExtendsNumber'
|
||||
The following declaration is incompatible because some supertypes are missing in the implementation:
|
||||
public abstract impl class ExtendsNumber
|
||||
|
||||
platform abstract class ExtendsNumber : Number
|
||||
^
|
||||
header abstract class ExtendsNumber : Number
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleClasses/jvm.kt:1:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||
impl interface PClass
|
||||
^
|
||||
|
||||
+10
-10
@@ -1,14 +1,14 @@
|
||||
platform infix fun Int.plus(s: CharSequence): Int
|
||||
platform fun Int.minus(s: String): Int
|
||||
header infix fun Int.plus(s: CharSequence): Int
|
||||
header fun Int.minus(s: String): Int
|
||||
|
||||
platform operator fun Double.times(x: CharArray)
|
||||
platform fun Double.divide(x: ByteArray)
|
||||
header operator fun Double.times(x: CharArray)
|
||||
header fun Double.divide(x: ByteArray)
|
||||
|
||||
platform external fun f1()
|
||||
platform fun g1()
|
||||
header external fun f1()
|
||||
header fun g1()
|
||||
|
||||
platform inline fun f2()
|
||||
platform fun g2()
|
||||
header inline fun f2()
|
||||
header fun g2()
|
||||
|
||||
platform tailrec fun f3()
|
||||
platform fun g3()
|
||||
header tailrec fun f3()
|
||||
header fun g3()
|
||||
|
||||
@@ -5,65 +5,65 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:1:1: error: no definition is found for platform declaration 'plus'
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:1:1: error: no implementation is found for header declaration 'plus'
|
||||
The following declaration is incompatible because modifiers are different (external, infix, inline, operator, suspend, tailrec):
|
||||
public impl fun Int.plus(s: CharSequence): Int
|
||||
|
||||
platform infix fun Int.plus(s: CharSequence): Int
|
||||
header infix fun Int.plus(s: CharSequence): Int
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:2:1: error: no definition is found for platform declaration 'minus'
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:2:1: error: no implementation is found for header declaration 'minus'
|
||||
The following declaration is incompatible because modifiers are different (external, infix, inline, operator, suspend, tailrec):
|
||||
public infix impl fun Int.minus(s: String): Int
|
||||
|
||||
platform fun Int.minus(s: String): Int
|
||||
header fun Int.minus(s: String): Int
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:4:1: error: no definition is found for platform declaration 'times'
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:4:1: error: no implementation is found for header declaration 'times'
|
||||
The following declaration is incompatible because modifiers are different (external, infix, inline, operator, suspend, tailrec):
|
||||
public impl fun Double.times(x: CharArray): Unit
|
||||
|
||||
platform operator fun Double.times(x: CharArray)
|
||||
header operator fun Double.times(x: CharArray)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:5:1: error: no definition is found for platform declaration 'divide'
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:5:1: error: no implementation is found for header declaration 'divide'
|
||||
The following declaration is incompatible because modifiers are different (external, infix, inline, operator, suspend, tailrec):
|
||||
public operator impl fun Double.divide(x: ByteArray): Unit
|
||||
|
||||
platform fun Double.divide(x: ByteArray)
|
||||
header fun Double.divide(x: ByteArray)
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:7:1: error: no definition is found for platform declaration 'f1'
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:7:1: error: no implementation is found for header declaration 'f1'
|
||||
The following declaration is incompatible because modifiers are different (external, infix, inline, operator, suspend, tailrec):
|
||||
public impl fun f1(): Unit
|
||||
|
||||
platform external fun f1()
|
||||
header external fun f1()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:8:1: error: no definition is found for platform declaration 'g1'
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:8:1: error: no implementation is found for header declaration 'g1'
|
||||
The following declaration is incompatible because modifiers are different (external, infix, inline, operator, suspend, tailrec):
|
||||
public external impl fun g1(): Unit
|
||||
|
||||
platform fun g1()
|
||||
header fun g1()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:10:1: error: no definition is found for platform declaration 'f2'
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:10:1: error: no implementation is found for header declaration 'f2'
|
||||
The following declaration is incompatible because modifiers are different (external, infix, inline, operator, suspend, tailrec):
|
||||
public impl fun f2(): Unit
|
||||
|
||||
platform inline fun f2()
|
||||
header inline fun f2()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:11:1: error: no definition is found for platform declaration 'g2'
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:11:1: error: no implementation is found for header declaration 'g2'
|
||||
The following declaration is incompatible because modifiers are different (external, infix, inline, operator, suspend, tailrec):
|
||||
public inline impl fun g2(): Unit
|
||||
|
||||
platform fun g2()
|
||||
header fun g2()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:13:1: error: no definition is found for platform declaration 'f3'
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:13:1: error: no implementation is found for header declaration 'f3'
|
||||
The following declaration is incompatible because modifiers are different (external, infix, inline, operator, suspend, tailrec):
|
||||
public impl fun f3(): Unit
|
||||
|
||||
platform tailrec fun f3()
|
||||
header tailrec fun f3()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:14:1: error: no definition is found for platform declaration 'g3'
|
||||
compiler/testData/multiplatform/incompatibleFunctions/common.kt:14:1: error: no implementation is found for header declaration 'g3'
|
||||
The following declaration is incompatible because modifiers are different (external, infix, inline, operator, suspend, tailrec):
|
||||
public tailrec impl fun g3(): Unit
|
||||
|
||||
platform fun g3()
|
||||
header fun g3()
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleFunctions/jvm.kt:1:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||
impl fun Int.plus(s: CharSequence): Int = 0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
platform val pval: String
|
||||
platform var pvar: String
|
||||
header val pval: String
|
||||
header var pvar: String
|
||||
|
||||
@@ -5,17 +5,17 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/incompatibleProperties/common.kt:1:1: error: no definition is found for platform declaration 'pval'
|
||||
compiler/testData/multiplatform/incompatibleProperties/common.kt:1:1: error: no implementation is found for header declaration 'pval'
|
||||
The following declaration is incompatible because property kinds are different (val vs var):
|
||||
public var pval: String
|
||||
|
||||
platform val pval: String
|
||||
header val pval: String
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleProperties/common.kt:2:1: error: no definition is found for platform declaration 'pvar'
|
||||
compiler/testData/multiplatform/incompatibleProperties/common.kt:2:1: error: no implementation is found for header declaration 'pvar'
|
||||
The following declaration is incompatible because property kinds are different (val vs var):
|
||||
public val pvar: String
|
||||
|
||||
platform var pvar: String
|
||||
header var pvar: String
|
||||
^
|
||||
compiler/testData/multiplatform/incompatibleProperties/jvm.kt:1:1: error: modifier 'impl' is only applicable to members that are initially declared in platform-independent code
|
||||
impl var pval: String = ""
|
||||
|
||||
@@ -1 +1 @@
|
||||
platform class Foo
|
||||
header class Foo
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
platform class Printer {
|
||||
header class Printer {
|
||||
fun print(message: String)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user