diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/SpecialBackendChecksTraversal.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/SpecialBackendChecksTraversal.kt index e95a4d50f0c..f649cf3fc62 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/SpecialBackendChecksTraversal.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/SpecialBackendChecksTraversal.kt @@ -335,6 +335,7 @@ private class BackendChecker( } override fun visitField(declaration: IrField) { + declaration.acceptChildrenVoid(this) if (declaration.isFakeOverride) return // Can't happen now, just trying to be future-proof here. val parent = declaration.parent diff --git a/kotlin-native/backend.native/tests/compilerChecks/README.md b/kotlin-native/backend.native/tests/compilerChecks/README.md index ed0e58769b0..38973e626e3 100644 --- a/kotlin-native/backend.native/tests/compilerChecks/README.md +++ b/kotlin-native/backend.native/tests/compilerChecks/README.md @@ -5,7 +5,7 @@ To run tests manually on MacOS, - run `runtests.sh` as described below. 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: ```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: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/t51.kt - MISSING EXPECTED ERROR FOR 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: + 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: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 diff --git a/kotlin-native/backend.native/tests/compilerChecks/t52.kt b/kotlin-native/backend.native/tests/compilerChecks/t52.kt index 2697203eef3..a22ddeafb2e 100644 --- a/kotlin-native/backend.native/tests/compilerChecks/t52.kt +++ b/kotlin-native/backend.native/tests/compilerChecks/t52.kt @@ -1,6 +1,6 @@ import kotlin.native.ref.* -@OptIn(kotlin.ExperimentalStdlibApi::class) +@OptIn(kotlin.experimental.ExperimentalNativeApi::class) fun foo(x: Int) { createCleaner(42) { println(x) } } diff --git a/kotlin-native/backend.native/tests/compilerChecks/t53.kt b/kotlin-native/backend.native/tests/compilerChecks/t53.kt index 4228e39a588..ac156cec282 100644 --- a/kotlin-native/backend.native/tests/compilerChecks/t53.kt +++ b/kotlin-native/backend.native/tests/compilerChecks/t53.kt @@ -4,7 +4,7 @@ class C(val x: Int) { fun bar(y: Int) = println(x + y) } -@OptIn(kotlin.ExperimentalStdlibApi::class) +@OptIn(kotlin.experimental.ExperimentalNativeApi::class) fun foo(x: Int) { createCleaner(42, C(x)::bar) }