From 2ce2565e8f9da1c92b0369cfc75387d77a5c1cd6 Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Mon, 2 Nov 2020 16:38:31 +0300 Subject: [PATCH] Simplify check for NativePointed in SpecialBackendChecksTraversal --- .../kotlin/backend/konan/lower/SpecialBackendChecksTraversal.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ec64e94faf8..d82f3c04f3b 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 @@ -317,7 +317,7 @@ private class BackendChecker(val context: Context, val irFile: IrFile) : IrEleme ) } - if (callee.returnType.getInlinedClassNative()?.descriptor == interop.nativePointed) + if (callee.returnType.isNativePointed(symbols)) reportError(expression, "Native interop types constructors must not be called directly") }