From f8ae097e50827d02e5a9a318f12374079226713d Mon Sep 17 00:00:00 2001 From: Stanislav Erokhin Date: Mon, 4 Apr 2022 13:59:39 +0200 Subject: [PATCH] Restore API used in mobile-ide/kotlin-ocswift See IDEA/f53c2114c38f856bdf0ff4d01de9fffeeeb630f2 commit. In 222+ IDEA usage of the old ErrorUtils (and other classes) was eliminated, but not in the 211-221 versions. Relevant Kotlin commit: b5933c70e20a0dfd788d8d4a6c04ca0d16f7c731 Also, I noticed that stub for createUnresolvedType do not store arguments into Error type, so I've fixed that too --- .../src/org/jetbrains/kotlin/types/ErrorUtils.kt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.kt b/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.kt index 6da2efee1d0..aba91c9d4a9 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.kt @@ -23,6 +23,18 @@ object ErrorUtils { ) @JvmStatic fun createUnresolvedType(presentableName: String, arguments: List): SimpleType { - return org.jetbrains.kotlin.types.error.ErrorUtils.createErrorType(ErrorTypeKind.UNRESOLVED_TYPE, this.toString()) + return org.jetbrains.kotlin.types.error.ErrorUtils.createErrorTypeWithArguments( + ErrorTypeKind.UNRESOLVED_TYPE, arguments, this.toString() + ) + } + + @IDEAPluginsCompatibilityAPI( + _213, _221, + message = "Please migrate to the org.jetbrains.kotlin.types.error.ErrorUtils", + plugins = "mobile-ide/kotlin-ocswift" + ) + @JvmStatic + fun createErrorType(debugMessage: String): SimpleType { + return org.jetbrains.kotlin.types.error.ErrorUtils.createErrorType(ErrorTypeKind.UNRESOLVED_TYPE, debugMessage) } } \ No newline at end of file