Migration to expect/actual: fix multiplatform highlighting tests

This commit is contained in:
Mikhail Glukhikh
2017-09-15 10:51:27 +03:00
parent 85d6a4d1af
commit 32cc619f15
18 changed files with 54 additions and 54 deletions
@@ -1,3 +1,3 @@
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] 'header' class 'My' has no implementation in module jvm for JVM">My</error> {
expect class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] 'header' class 'My' has no implementation in module jvm for JVM">My</error> {
}
@@ -1,15 +1,15 @@
impl class <error descr="[IMPLEMENTATION_WITHOUT_HEADER] 'impl' class 'Your' has no corresponding 'header' declaration">Your</error> {
actual class <error descr="[IMPLEMENTATION_WITHOUT_HEADER] 'impl' class 'Your' has no corresponding 'header' declaration">Your</error> {
}
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] 'header' class 'His' has no implementation in module jvm for JVM">His</error> {
expect class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] 'header' class 'His' has no implementation in module jvm for JVM">His</error> {
}
header class Their {
expect class Their {
}
impl class Their {
actual class Their {
}
@@ -1,3 +1,3 @@
header class My {
expect class My {
}
@@ -1,3 +1,3 @@
impl class My {
actual class My {
}
@@ -1,7 +1,7 @@
package test
header class Simple
header fun createSimple(): Simple
expect class Simple
expect fun createSimple(): Simple
header class Generic<A, B>
header fun <A, B> createGeneric(a: A, b: B): Generic<A, B>
expect class Generic<A, B>
expect fun <A, B> createGeneric(a: A, b: B): Generic<A, B>
@@ -1,9 +1,9 @@
package test
class SimpleImpl
impl typealias Simple = SimpleImpl
impl fun createSimple(): Simple = SimpleImpl()
actual typealias Simple = SimpleImpl
actual fun createSimple(): Simple = SimpleImpl()
class GenericImpl<A, B>
impl typealias Generic<A, B> = GenericImpl<A, B>
impl fun <A, B> createGeneric(a: A, b: B): Generic<A, B> = GenericImpl()
actual typealias Generic<A, B> = GenericImpl<A, B>
actual fun <A, B> createGeneric(a: A, b: B): Generic<A, B> = GenericImpl()
@@ -1,11 +1,11 @@
package test
header fun stringBuilder(sb: StringBuilder)
expect fun stringBuilder(sb: StringBuilder)
header fun kotlinVersion(kv: KotlinVersion)
expect fun kotlinVersion(kv: KotlinVersion)
header fun regex(r: Regex)
expect fun regex(r: Regex)
header fun pair(p: Pair<String, List<Double>>)
expect fun pair(p: Pair<String, List<Double>>)
header fun <A, B> genericPair(p: Pair<A, B>)
expect fun <A, B> genericPair(p: Pair<A, B>)
@@ -1,11 +1,11 @@
package test
impl fun stringBuilder(sb: StringBuilder) {}
actual fun stringBuilder(sb: StringBuilder) {}
impl fun kotlinVersion(kv: KotlinVersion) {}
actual fun kotlinVersion(kv: KotlinVersion) {}
impl fun regex(r: Regex) {}
actual fun regex(r: Regex) {}
impl fun pair(p: Pair<String, List<Double>>) {}
actual fun pair(p: Pair<String, List<Double>>) {}
impl fun <A, B> genericPair(p: Pair<A, B>) {}
actual fun <A, B> genericPair(p: Pair<A, B>) {}
@@ -1,3 +1,3 @@
header fun foo(): Int
expect fun foo(): Int
header val bar: String
expect val bar: String
@@ -1,3 +1,3 @@
impl fun foo() = 42
actual fun foo() = 42
impl val bar = "Hello"
actual val bar = "Hello"
@@ -1,4 +1,4 @@
header class My {
expect class My {
fun foo(): Int
@@ -6,7 +6,7 @@ header class My {
}
header class Your {
expect class Your {
fun foo(): Int
@@ -14,7 +14,7 @@ header class Your {
}
header class His {
expect class His {
fun foo(): Int
@@ -1,20 +1,20 @@
impl class <error>My</error> {
actual class <error>My</error> {
impl fun foo() = 42
actual fun foo() = 42
}
impl class Your {
actual class Your {
impl fun foo() = 13
actual fun foo() = 13
<error>impl fun bar(arg: Int)</error> = arg
<error>actual fun bar(arg: Int)</error> = arg
}
impl class His {
actual class His {
impl fun foo() = 7
actual fun foo() = 7
impl fun bar(arg: Int) = arg == foo()
actual fun bar(arg: Int) = arg == foo()
}
@@ -1,3 +1,3 @@
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] 'header' class 'My' has no implementation in module js for JS"><error descr="[HEADER_WITHOUT_IMPLEMENTATION] 'header' class 'My' has no implementation in module jvm for JVM">My</error></error> {
expect class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] 'header' class 'My' has no implementation in module js for JS"><error descr="[HEADER_WITHOUT_IMPLEMENTATION] 'header' class 'My' has no implementation in module jvm for JVM">My</error></error> {
}
@@ -1,15 +1,15 @@
package a
header class A {
expect class A {
class Nested
}
header class B {
expect class B {
class Nested {
fun foo(s: String)
}
}
header class C {
expect class C {
<error>header</error> inner class Inner
}
@@ -1,11 +1,11 @@
package a
impl class <error>A</error>
actual class <error>A</error>
impl class B {
impl class <error>Nested</error>
actual class B {
actual class <error>Nested</error>
}
impl class C {
impl inner class Inner
actual class C {
actual inner class Inner
}
@@ -1,7 +1,7 @@
// See KT-15601
@Suppress("HEADER_WITHOUT_IMPLEMENTATION")
header interface Event
expect interface Event
@Suppress("SOMETHING_WRONG")
header class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] 'header' class 'Wrong' has no implementation in module jvm for JVM">Wrong</error>
expect class <error descr="[HEADER_WITHOUT_IMPLEMENTATION] 'header' class 'Wrong' has no implementation in module jvm for JVM">Wrong</error>
@@ -1,3 +1,3 @@
header fun foo(arg: Int): Int
expect fun foo(arg: Int): Int
<error>header fun foo(): Int</error>
<error>expect fun foo(): Int</error>
@@ -1 +1 @@
impl fun foo(arg: Int) = arg
actual fun foo(arg: Int) = arg