Migration: header->expect & impl->actual in IDEA test data

This commit is contained in:
Mikhail Glukhikh
2017-09-15 12:04:30 +03:00
parent 32cc619f15
commit 6e41bbc2a7
430 changed files with 663 additions and 663 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
// No "unused symbol" should be reported here // No "unused symbol" should be reported here
header class My expect class My
impl class My actual class My
// But this should be reported // But this should be reported
header val bar: String expect val bar: String
@@ -1,6 +1,6 @@
// SKIP_ERRORS_BEFORE // SKIP_ERRORS_BEFORE
// SKIP_ERRORS_AFTER // SKIP_ERRORS_AFTER
// IS_APPLICABLE: false // IS_APPLICABLE: false
header class Header { expect class Header {
val <caret>x: Int val <caret>x: Int
} }
@@ -1,4 +1,4 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
// OPTIONS: usages // OPTIONS: usages
header fun <caret>boo(s: String) expect fun <caret>boo(s: String)
@@ -1,4 +1,4 @@
impl fun boo(s: String) {} actual fun boo(s: String) {}
fun test() { fun test() {
boo("a") boo("a")
@@ -1,4 +1,4 @@
header class <lineMarker>Header</lineMarker> { expect class <lineMarker>Header</lineMarker> {
} }
@@ -1,4 +1,4 @@
// !CHECK_HIGHLIGHTING // !CHECK_HIGHLIGHTING
impl typealias Header = String actual typealias Header = String
@@ -1,7 +1,7 @@
header class <lineMarker>Header</lineMarker> { expect class <lineMarker>Header</lineMarker> {
fun foo(): Int fun foo(): Int
} }
header fun <lineMarker>foo</lineMarker>(arg: Int): String expect fun <lineMarker>foo</lineMarker>(arg: Int): String
header val <lineMarker>flag</lineMarker>: Boolean expect val <lineMarker>flag</lineMarker>: Boolean
@@ -1,11 +1,11 @@
// !CHECK_HIGHLIGHTING // !CHECK_HIGHLIGHTING
impl class Header { actual class Header {
impl fun foo() = 42 actual fun foo() = 42
} }
impl fun foo(arg: Int) = arg.toString() actual fun foo(arg: Int) = arg.toString()
impl val flag = true actual val flag = true
@@ -1,9 +1,9 @@
// !CHECK_HIGHLIGHTING // !CHECK_HIGHLIGHTING
header class Header { expect class Header {
fun foo(): Int fun foo(): Int
} }
header fun foo(arg: Int): String expect fun foo(arg: Int): String
header val flag: Boolean expect val flag: Boolean
@@ -1,9 +1,9 @@
impl class <lineMarker>Header</lineMarker> { actual class <lineMarker>Header</lineMarker> {
impl fun <lineMarker>foo</lineMarker>() = 42 actual fun <lineMarker>foo</lineMarker>() = 42
} }
impl fun <lineMarker>foo</lineMarker>(arg: Int) = arg.toString() actual fun <lineMarker>foo</lineMarker>(arg: Int) = arg.toString()
impl val <lineMarker>flag</lineMarker> = true actual val <lineMarker>flag</lineMarker> = true
@@ -1,3 +1,3 @@
header fun <lineMarker descr="Has actuals in JVM">foo</lineMarker>(): Int expect fun <lineMarker descr="Has actuals in JVM">foo</lineMarker>(): Int
header fun <lineMarker descr="Has actuals in JVM">foo</lineMarker>(arg: Int): Int expect fun <lineMarker descr="Has actuals in JVM">foo</lineMarker>(arg: Int): Int
@@ -1,5 +1,5 @@
// !CHECK_HIGHLIGHTING // !CHECK_HIGHLIGHTING
impl fun foo() = 42 actual fun foo() = 42
impl fun foo(arg: Int) = 7 * arg actual fun foo(arg: Int) = 7 * arg
@@ -1,6 +1,6 @@
// "Create actual class for platform JS" "true" // "Create actual class for platform JS" "true"
header abstract class <caret>Abstract { expect abstract class <caret>Abstract {
fun foo(param: String): Int fun foo(param: String): Int
abstract fun String.bar(y: Double): Boolean abstract fun String.bar(y: Double): Boolean
@@ -1,6 +1,6 @@
// "Create actual class for platform JS" "true" // "Create actual class for platform JS" "true"
header abstract class Abstract { expect abstract class Abstract {
fun foo(param: String): Int fun foo(param: String): Int
abstract fun String.bar(y: Double): Boolean abstract fun String.bar(y: Double): Boolean
@@ -1,5 +1,5 @@
// "Add 'operator' modifier" "true" // "Add 'operator' modifier" "true"
header class Foo { expect class Foo {
fun <caret>unaryMinus() fun <caret>unaryMinus()
} }
@@ -1,5 +1,5 @@
// "Add 'operator' modifier" "true" // "Add 'operator' modifier" "true"
header class Foo { expect class Foo {
operator fun unaryMinus() operator fun unaryMinus()
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun unaryMinus() { actual fun unaryMinus() {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl operator fun unaryMinus() { actual operator fun unaryMinus() {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun unaryMinus() { actual fun unaryMinus() {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl operator fun unaryMinus() { actual operator fun unaryMinus() {
} }
} }
@@ -1,3 +1,3 @@
header class Foo { expect class Foo {
fun unaryMinus() fun unaryMinus()
} }
@@ -1,3 +1,3 @@
header class Foo { expect class Foo {
operator fun unaryMinus() operator fun unaryMinus()
} }
@@ -1,7 +1,7 @@
// "Add 'operator' modifier" "true" // "Add 'operator' modifier" "true"
impl class Foo { actual class Foo {
impl fun <caret>unaryMinus() { actual fun <caret>unaryMinus() {
} }
} }
@@ -1,7 +1,7 @@
// "Add 'operator' modifier" "true" // "Add 'operator' modifier" "true"
impl class Foo { actual class Foo {
impl operator fun unaryMinus() { actual operator fun unaryMinus() {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun unaryMinus() { actual fun unaryMinus() {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl operator fun unaryMinus() { actual operator fun unaryMinus() {
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
// "Create actual class for platform JVM" "true" // "Create actual class for platform JVM" "true"
header class <caret>My { expect class <caret>My {
fun foo(param: String): Int fun foo(param: String): Int
fun String.bar(y: Double): Boolean fun String.bar(y: Double): Boolean
@@ -1,6 +1,6 @@
// "Create actual class for platform JVM" "true" // "Create actual class for platform JVM" "true"
header class My { expect class My {
fun foo(param: String): Int fun foo(param: String): Int
fun String.bar(y: Double): Boolean fun String.bar(y: Double): Boolean
@@ -1 +1 @@
impl class My actual class My
@@ -1 +1 @@
impl class My actual class My
@@ -1 +1 @@
header class My expect class My
@@ -1 +1 @@
header class My expect class My
+1 -1
View File
@@ -1,6 +1,6 @@
// "Create actual class for platform JS" "true" // "Create actual class for platform JS" "true"
header enum class <caret>MyEnum { expect enum class <caret>MyEnum {
FIRST, FIRST,
SECOND, SECOND,
LAST; LAST;
@@ -1,6 +1,6 @@
// "Create actual class for platform JS" "true" // "Create actual class for platform JS" "true"
header enum class MyEnum { expect enum class MyEnum {
FIRST, FIRST,
SECOND, SECOND,
LAST; LAST;
@@ -1,3 +1,3 @@
// "Create actual function for platform JVM" "true" // "Create actual function for platform JVM" "true"
header fun <caret>foo(arg: Int): String expect fun <caret>foo(arg: Int): String
@@ -1,3 +1,3 @@
// "Create actual function for platform JVM" "true" // "Create actual function for platform JVM" "true"
header fun foo(arg: Int): String expect fun foo(arg: Int): String
@@ -1,6 +1,6 @@
// "Convert '(Int) -> Int' to 'Int.() -> Int'" "true" // "Convert '(Int) -> Int' to 'Int.() -> Int'" "true"
header fun foo(n: Int, action: (<caret>Int) -> Int): Int expect fun foo(n: Int, action: (<caret>Int) -> Int): Int
fun test() { fun test() {
foo(1) { n -> n + 1 } foo(1) { n -> n + 1 }
@@ -1,6 +1,6 @@
// "Convert '(Int) -> Int' to 'Int.() -> Int'" "true" // "Convert '(Int) -> Int' to 'Int.() -> Int'" "true"
header fun foo(n: Int, action: Int.() -> Int): Int expect fun foo(n: Int, action: Int.() -> Int): Int
fun test() { fun test() {
foo(1) { this + 1 } foo(1) { this + 1 }
@@ -1,4 +1,4 @@
impl fun foo(n: Int, action: (Int) -> Int) = action(n) actual fun foo(n: Int, action: (Int) -> Int) = action(n)
fun test() { fun test() {
foo(1) { n -> n + 1 } foo(1) { n -> n + 1 }
@@ -1,4 +1,4 @@
impl fun foo(n: Int, action: Int.() -> Int) = n.action() actual fun foo(n: Int, action: Int.() -> Int) = n.action()
fun test() { fun test() {
foo(1) { this + 1 } foo(1) { this + 1 }
@@ -1,4 +1,4 @@
impl fun foo(n: Int, action: (Int) -> Int) = action(n) actual fun foo(n: Int, action: (Int) -> Int) = action(n)
fun test() { fun test() {
foo(1) { n -> n + 1 } foo(1) { n -> n + 1 }
@@ -1,4 +1,4 @@
impl fun foo(n: Int, action: Int.() -> Int) = n.action() actual fun foo(n: Int, action: Int.() -> Int) = n.action()
fun test() { fun test() {
foo(1) { this + 1 } foo(1) { this + 1 }
@@ -1,4 +1,4 @@
header fun foo(n: Int, action: (Int) -> Int): Int expect fun foo(n: Int, action: (Int) -> Int): Int
fun test() { fun test() {
foo(1) { n -> n + 1 } foo(1) { n -> n + 1 }
@@ -1,4 +1,4 @@
header fun foo(n: Int, action: Int.() -> Int): Int expect fun foo(n: Int, action: Int.() -> Int): Int
fun test() { fun test() {
foo(1) { this + 1 } foo(1) { this + 1 }
@@ -1,6 +1,6 @@
// "Convert '(Int) -> Int' to 'Int.() -> Int'" "true" // "Convert '(Int) -> Int' to 'Int.() -> Int'" "true"
impl fun foo(n: Int, action: (<caret>Int) -> Int) = action(n) actual fun foo(n: Int, action: (<caret>Int) -> Int) = action(n)
fun test() { fun test() {
foo(1) { n -> n + 1 } foo(1) { n -> n + 1 }
@@ -1,6 +1,6 @@
// "Convert '(Int) -> Int' to 'Int.() -> Int'" "true" // "Convert '(Int) -> Int' to 'Int.() -> Int'" "true"
impl fun foo(n: Int, action: Int.() -> Int) = n.action() actual fun foo(n: Int, action: Int.() -> Int) = n.action()
fun test() { fun test() {
foo(1) { this + 1 } foo(1) { this + 1 }
@@ -1,4 +1,4 @@
impl fun foo(n: Int, action: (Int) -> Int) = action(n) actual fun foo(n: Int, action: (Int) -> Int) = action(n)
fun test() { fun test() {
foo(1) { n -> n + 1 } foo(1) { n -> n + 1 }
@@ -1,4 +1,4 @@
impl fun foo(n: Int, action: Int.() -> Int) = n.action() actual fun foo(n: Int, action: Int.() -> Int) = n.action()
fun test() { fun test() {
foo(1) { this + 1 } foo(1) { this + 1 }
@@ -1,6 +1,6 @@
// "Convert 'Int.() -> Int' to '(Int) -> Int'" "true" // "Convert 'Int.() -> Int' to '(Int) -> Int'" "true"
header fun foo(n: Int, action: <caret>Int.() -> Int): Int expect fun foo(n: Int, action: <caret>Int.() -> Int): Int
fun test() { fun test() {
foo(1) { this + 1 } foo(1) { this + 1 }
@@ -1,6 +1,6 @@
// "Convert 'Int.() -> Int' to '(Int) -> Int'" "true" // "Convert 'Int.() -> Int' to '(Int) -> Int'" "true"
header fun foo(n: Int, action: (Int) -> Int): Int expect fun foo(n: Int, action: (Int) -> Int): Int
fun test() { fun test() {
foo(1) { i -> i + 1 } foo(1) { i -> i + 1 }
@@ -1,4 +1,4 @@
impl fun foo(n: Int, action: Int.() -> Int) = n.action() actual fun foo(n: Int, action: Int.() -> Int) = n.action()
fun test() { fun test() {
foo(1) { this + 1 } foo(1) { this + 1 }
@@ -1,4 +1,4 @@
impl fun foo(n: Int, action: (Int) -> Int) = action(n) actual fun foo(n: Int, action: (Int) -> Int) = action(n)
fun test() { fun test() {
foo(1) { i -> i + 1 } foo(1) { i -> i + 1 }
@@ -1,4 +1,4 @@
impl fun foo(n: Int, action: Int.() -> Int) = n.action() actual fun foo(n: Int, action: Int.() -> Int) = n.action()
fun test() { fun test() {
foo(1) { this + 1 } foo(1) { this + 1 }
@@ -1,4 +1,4 @@
impl fun foo(n: Int, action: (Int) -> Int) = action(n) actual fun foo(n: Int, action: (Int) -> Int) = action(n)
fun test() { fun test() {
foo(1) { i -> i + 1 } foo(1) { i -> i + 1 }
@@ -1,4 +1,4 @@
header fun foo(n: Int, action: Int.() -> Int): Int expect fun foo(n: Int, action: Int.() -> Int): Int
fun test() { fun test() {
foo(1) { this + 1 } foo(1) { this + 1 }
@@ -1,4 +1,4 @@
header fun foo(n: Int, action: (Int) -> Int): Int expect fun foo(n: Int, action: (Int) -> Int): Int
fun test() { fun test() {
foo(1) { i -> i + 1 } foo(1) { i -> i + 1 }
@@ -1,6 +1,6 @@
// "Convert 'Int.() -> Int' to '(Int) -> Int'" "true" // "Convert 'Int.() -> Int' to '(Int) -> Int'" "true"
impl fun foo(n: Int, action: <caret>Int.() -> Int) = n.action() actual fun foo(n: Int, action: <caret>Int.() -> Int) = n.action()
fun test() { fun test() {
foo(1) { this + 1 } foo(1) { this + 1 }
@@ -1,6 +1,6 @@
// "Convert 'Int.() -> Int' to '(Int) -> Int'" "true" // "Convert 'Int.() -> Int' to '(Int) -> Int'" "true"
impl fun foo(n: Int, action: (Int) -> Int) = action(n) actual fun foo(n: Int, action: (Int) -> Int) = action(n)
fun test() { fun test() {
foo(1) { i -> i + 1 } foo(1) { i -> i + 1 }
@@ -1,4 +1,4 @@
impl fun foo(n: Int, action: Int.() -> Int) = n.action() actual fun foo(n: Int, action: Int.() -> Int) = n.action()
fun test() { fun test() {
foo(1) { this + 1 } foo(1) { this + 1 }
@@ -1,4 +1,4 @@
impl fun foo(n: Int, action: (Int) -> Int) = action(n) actual fun foo(n: Int, action: (Int) -> Int) = action(n)
fun test() { fun test() {
foo(1) { i -> i + 1 } foo(1) { i -> i + 1 }
@@ -5,4 +5,4 @@ interface I {
fun foo() fun foo()
} }
header class <caret>Bar : I expect class <caret>Bar : I
@@ -5,6 +5,6 @@ interface I {
fun foo() fun foo()
} }
header class <caret>Bar : I { expect class <caret>Bar : I {
override fun foo() override fun foo()
} }
@@ -1,3 +1,3 @@
header abstract class Bar { expect abstract class Bar {
abstract fun foo() abstract fun foo()
} }
@@ -1,3 +1,3 @@
header abstract class Bar { expect abstract class Bar {
abstract fun foo() abstract fun foo()
} }
@@ -1,8 +1,8 @@
// "Implement members" "true" // "Implement members" "true"
// DISABLE-ERRORS // DISABLE-ERRORS
abstract impl class Bar { abstract actual class Bar {
abstract impl fun foo() abstract actual fun foo()
} }
class <caret>X : Bar() class <caret>X : Bar()
@@ -1,8 +1,8 @@
// "Implement members" "true" // "Implement members" "true"
// DISABLE-ERRORS // DISABLE-ERRORS
abstract impl class Bar { abstract actual class Bar {
abstract impl fun foo() abstract actual fun foo()
} }
class X : Bar() { class X : Bar() {
@@ -1,6 +1,6 @@
// "Create actual interface for platform JVM" "true" // "Create actual interface for platform JVM" "true"
header interface <caret>Interface { expect interface <caret>Interface {
fun foo(param: String): Int fun foo(param: String): Int
fun String.bar(y: Double): Boolean fun String.bar(y: Double): Boolean
@@ -1,6 +1,6 @@
// "Create actual interface for platform JVM" "true" // "Create actual interface for platform JVM" "true"
header interface Interface { expect interface Interface {
fun foo(param: String): Int fun foo(param: String): Int
fun String.bar(y: Double): Boolean fun String.bar(y: Double): Boolean
@@ -1,6 +1,6 @@
// "Convert parameter to receiver" "true" // "Convert parameter to receiver" "true"
header class Foo { expect class Foo {
fun foo(n: Int, <caret>s: String) fun foo(n: Int, <caret>s: String)
} }
@@ -1,6 +1,6 @@
// "Convert parameter to receiver" "true" // "Convert parameter to receiver" "true"
header class Foo { expect class Foo {
fun String.foo(n: Int) fun String.foo(n: Int)
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun foo(n: Int, s: String) { actual fun foo(n: Int, s: String) {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun String.foo(n: Int) { actual fun String.foo(n: Int) {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun foo(n: Int, s: String) { actual fun foo(n: Int, s: String) {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun String.foo(n: Int) { actual fun String.foo(n: Int) {
} }
} }
@@ -1,4 +1,4 @@
header class Foo { expect class Foo {
fun foo(n: Int, s: String) fun foo(n: Int, s: String)
} }
@@ -1,4 +1,4 @@
header class Foo { expect class Foo {
fun String.foo(n: Int) fun String.foo(n: Int)
} }
@@ -1,7 +1,7 @@
// "Convert parameter to receiver" "true" // "Convert parameter to receiver" "true"
impl class Foo { actual class Foo {
impl fun foo(n: Int, <caret>s: String) { actual fun foo(n: Int, <caret>s: String) {
} }
} }
@@ -1,7 +1,7 @@
// "Convert parameter to receiver" "true" // "Convert parameter to receiver" "true"
impl class Foo { actual class Foo {
impl fun String.foo(n: Int) { actual fun String.foo(n: Int) {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun foo(n: Int, s: String) { actual fun foo(n: Int, s: String) {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun String.foo(n: Int) { actual fun String.foo(n: Int) {
} }
} }
@@ -1,6 +1,6 @@
// "Convert receiver to parameter" "true" // "Convert receiver to parameter" "true"
header class Foo { expect class Foo {
fun <caret>String.foo(n: Int) fun <caret>String.foo(n: Int)
} }
@@ -1,6 +1,6 @@
// "Convert receiver to parameter" "true" // "Convert receiver to parameter" "true"
header class Foo { expect class Foo {
fun foo(s: String, n: Int) fun foo(s: String, n: Int)
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun String.foo(n: Int) { actual fun String.foo(n: Int) {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun foo(s: String, n: Int) { actual fun foo(s: String, n: Int) {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun String.foo(n: Int) { actual fun String.foo(n: Int) {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun foo(s: String, n: Int) { actual fun foo(s: String, n: Int) {
} }
} }
@@ -1,4 +1,4 @@
header class Foo { expect class Foo {
fun String.foo(n: Int) fun String.foo(n: Int)
} }
@@ -1,4 +1,4 @@
header class Foo { expect class Foo {
fun foo(s: String, n: Int) fun foo(s: String, n: Int)
} }
@@ -1,7 +1,7 @@
// "Convert receiver to parameter" "true" // "Convert receiver to parameter" "true"
impl class Foo { actual class Foo {
impl fun <caret>String.foo(n: Int) { actual fun <caret>String.foo(n: Int) {
} }
} }
@@ -1,7 +1,7 @@
// "Convert receiver to parameter" "true" // "Convert receiver to parameter" "true"
impl class Foo { actual class Foo {
impl fun foo(s: String, n: Int) { actual fun foo(s: String, n: Int) {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun String.foo(n: Int) { actual fun String.foo(n: Int) {
} }
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun foo(s: String, n: Int) { actual fun foo(s: String, n: Int) {
} }
} }
@@ -1,5 +1,5 @@
// "Convert member to extension" "true" // "Convert member to extension" "true"
header class Foo { expect class Foo {
fun <caret>foo(n: Int) fun <caret>foo(n: Int)
} }
@@ -1,6 +1,6 @@
// "Convert member to extension" "true" // "Convert member to extension" "true"
header class Foo { expect class Foo {
} }
expect fun Foo.foo(n: Int) expect fun Foo.foo(n: Int)
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun foo(n: Int) { actual fun foo(n: Int) {
} }
} }
@@ -1,6 +1,6 @@
impl class Foo { actual class Foo {
} }
impl fun Foo.foo(n: Int) { actual fun Foo.foo(n: Int) {
} }
@@ -1,5 +1,5 @@
impl class Foo { actual class Foo {
impl fun foo(n: Int) { actual fun foo(n: Int) {
} }
} }
@@ -1,6 +1,6 @@
impl class Foo { actual class Foo {
} }
impl fun Foo.foo(n: Int) { actual fun Foo.foo(n: Int) {
} }
@@ -1,3 +1,3 @@
header class Foo { expect class Foo {
fun foo(n: Int) fun foo(n: Int)
} }
@@ -1,4 +1,4 @@
header class Foo { expect class Foo {
} }
expect fun Foo.foo(n: Int) expect fun Foo.foo(n: Int)

Some files were not shown because too many files have changed in this diff Show More