[K/N] Fix test t51.kt for special backend checks
This commit is contained in:
committed by
Space Team
parent
87e81d8562
commit
513738b5fe
+1
@@ -335,6 +335,7 @@ private class BackendChecker(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun visitField(declaration: IrField) {
|
override fun visitField(declaration: IrField) {
|
||||||
|
declaration.acceptChildrenVoid(this)
|
||||||
if (declaration.isFakeOverride) return // Can't happen now, just trying to be future-proof here.
|
if (declaration.isFakeOverride) return // Can't happen now, just trying to be future-proof here.
|
||||||
|
|
||||||
val parent = declaration.parent
|
val parent = declaration.parent
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ To run tests manually on MacOS,
|
|||||||
- run `runtests.sh` as described below.
|
- run `runtests.sh` as described below.
|
||||||
|
|
||||||
K1: `kotlin-native/backend.native/tests/compilerChecks/runtests.sh -language-version 1.9`
|
K1: `kotlin-native/backend.native/tests/compilerChecks/runtests.sh -language-version 1.9`
|
||||||
K2: `kotlin-native/backend.native/tests/compilerChecks/runtests.sh -language-version 2.0`
|
K2: `kotlin-native/backend.native/tests/compilerChecks/runtests.sh`
|
||||||
|
|
||||||
Reference output:
|
Reference output:
|
||||||
```text
|
```text
|
||||||
@@ -108,8 +108,8 @@ kotlin-native/backend.native/tests/compilerChecks/t5.kt:4:83: error: passing Str
|
|||||||
kotlin-native/backend.native/tests/compilerChecks/t50.kt
|
kotlin-native/backend.native/tests/compilerChecks/t50.kt
|
||||||
kotlin-native/backend.native/tests/compilerChecks/t50.kt:11:16: error: kotlin.native.concurrent.Worker.execute must take an unbound, non-capturing function or lambda, but captures at:
|
kotlin-native/backend.native/tests/compilerChecks/t50.kt:11:16: error: kotlin.native.concurrent.Worker.execute must take an unbound, non-capturing function or lambda, but captures at:
|
||||||
kotlin-native/backend.native/tests/compilerChecks/t50.kt:11:54
|
kotlin-native/backend.native/tests/compilerChecks/t50.kt:11:54
|
||||||
kotlin-native/backend.native/tests/compilerChecks/t51.kt
|
kotlin-native/backend.native/tests/compilerChecks/t51.kt:9:28: error: kotlin.native.concurrent.Worker.execute must take an unbound, non-capturing function or lambda, but captures at:
|
||||||
MISSING EXPECTED ERROR FOR kotlin-native/backend.native/tests/compilerChecks/t51.kt
|
kotlin-native/backend.native/tests/compilerChecks/t51.kt:9:66
|
||||||
kotlin-native/backend.native/tests/compilerChecks/t52.kt
|
kotlin-native/backend.native/tests/compilerChecks/t52.kt
|
||||||
kotlin-native/backend.native/tests/compilerChecks/t52.kt:5:5: error: kotlin.native.ref.createCleaner must take an unbound, non-capturing function or lambda, but captures at:
|
kotlin-native/backend.native/tests/compilerChecks/t52.kt:5:5: error: kotlin.native.ref.createCleaner must take an unbound, non-capturing function or lambda, but captures at:
|
||||||
kotlin-native/backend.native/tests/compilerChecks/t52.kt:5:33: x
|
kotlin-native/backend.native/tests/compilerChecks/t52.kt:5:33: x
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import kotlin.native.ref.*
|
import kotlin.native.ref.*
|
||||||
|
|
||||||
@OptIn(kotlin.ExperimentalStdlibApi::class)
|
@OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
fun foo(x: Int) {
|
fun foo(x: Int) {
|
||||||
createCleaner(42) { println(x) }
|
createCleaner(42) { println(x) }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ class C(val x: Int) {
|
|||||||
fun bar(y: Int) = println(x + y)
|
fun bar(y: Int) = println(x + y)
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(kotlin.ExperimentalStdlibApi::class)
|
@OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
fun foo(x: Int) {
|
fun foo(x: Int) {
|
||||||
createCleaner(42, C(x)::bar)
|
createCleaner(42, C(x)::bar)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user