From 409d959816725f7b2a5aafad0d0e962637d0f360 Mon Sep 17 00:00:00 2001 From: Vladimir Sukharev Date: Thu, 23 Jun 2022 07:35:06 +0000 Subject: [PATCH] KT-51593 Include more information in Objective-C header documentation #KT-51593 Fixed Merge-request: KT-MR-6437 Merged-by: Vladimir Sukharev --- .../objcexport/ObjCExportHeaderGenerator.kt | 89 +++- .../backend/konan/objcexport/StubRenderer.kt | 48 ++- .../kotlin/backend/konan/objcexport/stubs.kt | 22 +- .../tests/objcexport/expectedLazy.h | 393 ++++++++++-------- .../expectedLazyLegacySuspendUnit.h | 382 +++++++++-------- .../tests/objcexport/expectedLazyNoGenerics.h | 382 +++++++++-------- .../tests/objcexport/kt51593.kt | 53 +++ 7 files changed, 801 insertions(+), 568 deletions(-) create mode 100644 kotlin-native/backend.native/tests/objcexport/kt51593.kt diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt index 83597813720..b4bc19e425d 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt @@ -11,6 +11,8 @@ import org.jetbrains.kotlin.backend.konan.descriptors.* import org.jetbrains.kotlin.builtins.* import org.jetbrains.kotlin.builtins.KotlinBuiltIns.isAny import org.jetbrains.kotlin.descriptors.* +import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor +import org.jetbrains.kotlin.descriptors.annotations.Annotations import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.resolve.DataClassResolver import org.jetbrains.kotlin.resolve.constants.ArrayValue @@ -235,8 +237,9 @@ internal class ObjCExportTranslatorImpl( val name = translateClassOrInterfaceName(descriptor) val members: List> = buildMembers { translateInterfaceMembers(descriptor) } val superProtocols: List = descriptor.superProtocols + val comment = objCCommentOrNull(mustBeDocumentedAttributeList(descriptor.annotations)) - return objCProtocol(name, descriptor, superProtocols, members) + return objCProtocol(name, descriptor, superProtocols, members, comment = comment) } private val ClassDescriptor.superProtocols: List @@ -424,7 +427,8 @@ internal class ObjCExportTranslatorImpl( superClassGenerics = superClassGenerics, superProtocols = superProtocols, members = members, - attributes = attributes + attributes = attributes, + comment = objCCommentOrNull(mustBeDocumentedAttributeList(descriptor.annotations)) ) } @@ -610,7 +614,8 @@ internal class ObjCExportTranslatorImpl( val declarationAttributes = mutableListOf(swiftNameAttribute(name)) declarationAttributes.addIfNotNull(mapper.getDeprecation(property)?.toDeprecationAttribute()) - return ObjCProperty(name, property, type, attributes, setterName, getterName, declarationAttributes) + val commentOrNull = objCCommentOrNull(mustBeDocumentedAttributeList(property.annotations)) + return ObjCProperty(name, property, type, attributes, setterName, getterName, declarationAttributes, commentOrNull) } internal fun buildMethod( @@ -712,7 +717,7 @@ internal class ObjCExportTranslatorImpl( attributes.addIfNotNull(getDeprecationAttribute(method)) } - val comment = buildComment(method, baseMethodBridge) + val comment = buildComment(method, baseMethodBridge, parameters) return ObjCMethod(method, isInstanceMethod, returnType, selectorParts, parameters, attributes, comment) } @@ -739,16 +744,16 @@ internal class ObjCExportTranslatorImpl( } } - private fun buildComment(method: FunctionDescriptor, bridge: MethodBridge): ObjCComment? { - if (method.isSuspend || bridge.returnsError) { + private fun buildComment(method: FunctionDescriptor, bridge: MethodBridge, parameters: List): ObjCComment? { + val throwsComments = if (method.isSuspend || bridge.returnsError) { val effectiveThrows = getEffectiveThrows(method).toSet() - return when { + when { effectiveThrows.contains(throwableClassId) -> { - ObjCComment("@note This method converts all Kotlin exceptions to errors.") + listOf("@note This method converts all Kotlin exceptions to errors.") } effectiveThrows.isNotEmpty() -> { - ObjCComment( + listOf( buildString { append("@note This method converts instances of ") effectiveThrows.joinTo(this) { it.relativeClassName.asString() } @@ -760,12 +765,60 @@ internal class ObjCExportTranslatorImpl( else -> { // Shouldn't happen though. - ObjCComment("@warning All uncaught Kotlin exceptions are fatal.") + listOf("@warning All uncaught Kotlin exceptions are fatal.") } } - } + } else emptyList() - return null + val visibilityComments = when (method.visibility) { + DescriptorVisibilities.PROTECTED -> listOf("@note This method has protected visibility in Kotlin source and is intended only for use by subclasses.") + else -> emptyList() + } + val paramComments = parameters.flatMap { parameter -> + parameter.descriptor?.let { mustBeDocumentedParamAttributeList(parameter, descriptor = it) } ?: emptyList() + } + val annotationsComments = mustBeDocumentedAttributeList(method.annotations) + return objCCommentOrNull(annotationsComments + paramComments + throwsComments + visibilityComments) + } + + private fun mustBeDocumentedParamAttributeList(parameter: ObjCParameter, descriptor: ParameterDescriptor): List { + val mbdAnnotations = mustBeDocumentedAnnotations(descriptor.annotations).joinToString(" ") + return if (mbdAnnotations.isNotEmpty()) listOf("@param ${parameter.name} annotations $mbdAnnotations") else emptyList() + } + + private fun mustBeDocumentedAttributeList(annotations: Annotations): List { + val mustBeDocumentedAnnotations = mustBeDocumentedAnnotations(annotations) + return if (mustBeDocumentedAnnotations.isNotEmpty()) { + listOf("@note annotations") + mustBeDocumentedAnnotations.map { " $it" } + } else emptyList() + } + + private fun objCCommentOrNull(commentLines: List): ObjCComment? { + return if (commentLines.isNotEmpty()) ObjCComment(commentLines) else null + } + + private fun renderAnnotation(descriptor: AnnotationDescriptor, clazz: ClassDescriptor): String { + return buildString { + append(clazz.fqNameSafe) + if (descriptor.allValueArguments.isNotEmpty()) { + append('(') + descriptor.allValueArguments.entries.joinTo(this) + append(')') + } + } + } + + private val mustBeDocumentedAnnotationsStopList = setOf(StandardNames.FqNames.deprecated) + private fun mustBeDocumentedAnnotations(annotations: Annotations): List { + return annotations.mapNotNull { it -> + it.annotationClass?.let { annotationClass -> + if (!mustBeDocumentedAnnotationsStopList.contains(annotationClass.fqNameSafe) && annotationClass.annotations.any { metaAnnotation -> + metaAnnotation.fqName == StandardNames.FqNames.mustBeDocumented + }) + renderAnnotation(it, annotationClass) + else null + } + } } private val throwableClassId = ClassId.topLevel(StandardNames.FqNames.throwable) @@ -1279,7 +1332,8 @@ private fun objCInterface( superClassGenerics: List = emptyList(), superProtocols: List = emptyList(), members: List> = emptyList(), - attributes: List = emptyList() + attributes: List = emptyList(), + comment: ObjCComment? = null ): ObjCInterface = ObjCInterfaceImpl( name.objCName, generics, @@ -1289,7 +1343,8 @@ private fun objCInterface( superProtocols, null, members, - attributes + name.toNameAttributes() + attributes + name.toNameAttributes(), + comment ) private fun objCProtocol( @@ -1297,13 +1352,15 @@ private fun objCProtocol( descriptor: ClassDescriptor, superProtocols: List, members: List>, - attributes: List = emptyList() + attributes: List = emptyList(), + comment: ObjCComment? = null ): ObjCProtocol = ObjCProtocolImpl( name.objCName, descriptor, superProtocols, members, - attributes + name.toNameAttributes() + attributes + name.toNameAttributes(), + comment ) internal fun ObjCExportNamer.ClassOrProtocolName.toNameAttributes(): List = listOfNotNull( diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/StubRenderer.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/StubRenderer.kt index d28ab3e3530..1a1165432d8 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/StubRenderer.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/StubRenderer.kt @@ -13,33 +13,53 @@ import org.jetbrains.kotlin.backend.common.serialization.metadata.findKDocString object StubRenderer { fun render(stub: Stub<*>): List = render(stub, false) + + private fun findPositionToInsertGeneratedCommentLine(kDoc: List, generatedCommentLine: String): Int { + val generatedWords = generatedCommentLine.trim().split(" ").map { it.trim() } + if (generatedWords.size >= 2 && generatedWords[0] == "@param") { + for (i in kDoc.indices.reversed()) { + val kDocLineWords = kDoc[i].trim().split(" ").map { it.trim() }.filter { it.isNotEmpty() }.filterNot { it == "*" } + if (kDocLineWords.size >= 2 && kDocLineWords[0] == generatedWords[0] && kDocLineWords[1] == generatedWords[1]) { + return i + 1 // position after last `@param` kDoc line, describing same parameter as in generatedCommentLine + } + } + } + return kDoc.size + } + internal fun render(stub: Stub<*>, shouldExportKDoc: Boolean): List = collect { stub.run { + val (kDocEnding, commentBlockEnding) = if (comment?.contentLines == null) { + Pair("*/", null) // Close kDoc with `*/`, and print nothing after empty comment + } else { + Pair("", "*/") // Don't terminate kDoc, though close comment block with `*/` + } val kDoc = if (shouldExportKDoc) { descriptor?.extractKDocString()?.let { - if (it.isNotEmpty()) { // sometimes `findDoc` return empty string; is it a bug? + if (it.startsWith("/**") && it.endsWith("*/")) { // Nested comment is allowed inside of preformatted ``` block in kdoc but not in ObjC - val kdocClean = - if (it.startsWith("/**") && it.endsWith("*/")) - "/**${it.substring(3, it.length - 2).replace("*/", "**").replace("/*", "**")}*/" + val kdocClean = "/**${it.substring(3, it.length - 2).replace("*/", "**").replace("/*", "**")}$kDocEnding" + kdocClean.lines().map { it.trim().let { + if (it.isNotEmpty() && it[0] == '*') " $it" else it - +"" // Probably makes the output more readable. - kdocClean.lines().forEach { it.trim().let { - if (it.isNotEmpty() && it[0] == '*') +" $it" - else +"$it" } } } else null } } else null - comment?.let { comment -> - kDoc ?: let { +"" } // Probably makes the output more readable. - +"/**" - comment.contentLines.forEach { - +" $it" + val kDocAndComment = kDoc?.filterNot { it.isEmpty() }.orEmpty().toMutableList() + comment?.contentLines?.let { commentLine -> + if (!kDoc.isNullOrEmpty()) kDocAndComment.add(" *") // Separator between nonempty kDoc and nonempty comment + commentLine.forEach { kDocAndComment.add(findPositionToInsertGeneratedCommentLine(kDocAndComment, it), " * $it")} + } + if (kDocAndComment.isNotEmpty()) { + +"" // Probably makes the output more readable. + if (kDoc.isNullOrEmpty()) +"/**" // Start comment block, in case kDoc was empty + kDocAndComment.forEach { + +it } - +"*/" + commentBlockEnding?.let { +it } } when (this) { diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/stubs.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/stubs.kt index df336fb8b73..0e3b65fad82 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/stubs.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/stubs.kt @@ -27,28 +27,32 @@ abstract class Stub(val name: String, val comment get() = descriptor?.module?.isValid ?: true } -abstract class ObjCTopLevel(name: String) : Stub(name) +abstract class ObjCTopLevel(name: String, comment: ObjCComment? = null) : Stub(name, comment) abstract class ObjCClass(name: String, - val attributes: List) : ObjCTopLevel(name) { + val attributes: List, + comment: ObjCComment? = null) : ObjCTopLevel(name, comment) { abstract val superProtocols: List abstract val members: List> } abstract class ObjCProtocol(name: String, - attributes: List) : ObjCClass(name, attributes) + attributes: List, + comment: ObjCComment? = null) : ObjCClass(name, attributes, comment) class ObjCProtocolImpl( name: String, override val descriptor: ClassDescriptor, override val superProtocols: List, override val members: List>, - attributes: List = emptyList()) : ObjCProtocol(name, attributes) + attributes: List = emptyList(), + comment: ObjCComment? = null) : ObjCProtocol(name, attributes, comment) abstract class ObjCInterface(name: String, val generics: List, val categoryName: String?, - attributes: List) : ObjCClass(name, attributes) { + attributes: List, + comment: ObjCComment? = null) : ObjCClass(name, attributes, comment) { abstract val superClass: String? abstract val superClassGenerics: List } @@ -62,8 +66,9 @@ class ObjCInterfaceImpl( override val superProtocols: List = emptyList(), categoryName: String? = null, override val members: List> = emptyList(), - attributes: List = emptyList() -) : ObjCInterface(name, generics, categoryName, attributes) + attributes: List = emptyList(), + comment: ObjCComment? = null +) : ObjCInterface(name, generics, categoryName, attributes, comment) class ObjCMethod( override val descriptor: DeclarationDescriptor?, @@ -85,7 +90,8 @@ class ObjCProperty(name: String, val propertyAttributes: List, val setterName: String? = null, val getterName: String? = null, - val declarationAttributes: List = emptyList()) : Stub(name) { + val declarationAttributes: List = emptyList(), + comment: ObjCComment? = null) : Stub(name, comment) { @Deprecated("", ReplaceWith("this.propertyAttributes"), DeprecationLevel.WARNING) val attributes: List get() = propertyAttributes diff --git a/kotlin-native/backend.native/tests/objcexport/expectedLazy.h b/kotlin-native/backend.native/tests/objcexport/expectedLazy.h index 4d597fa644c..8176fda254c 100644 --- a/kotlin-native/backend.native/tests/objcexport/expectedLazy.h +++ b/kotlin-native/backend.native/tests/objcexport/expectedLazy.h @@ -144,8 +144,8 @@ __attribute__((swift_name("SuspendFun"))) @required /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)suspendFunDoYield:(BOOL)doYield doThrow:(BOOL)doThrow completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(doYield:doThrow:completionHandler:)"))); @end @@ -165,52 +165,52 @@ __attribute__((swift_name("SuspendBridge"))) @required /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)intValue:(id _Nullable)value completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("int(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)intAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("intAsAny(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)unitValue:(id _Nullable)value completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("unit(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)unitAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("unitAsAny(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)nullableUnitValue:(id _Nullable)value completionHandler:(void (^)(KtKotlinUnit * _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("nullableUnit(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingValue:(id _Nullable)value completionHandler:(void (^)(KtKotlinNothing * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothing(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsIntValue:(id _Nullable)value completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsInt(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsAny(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsUnitValue:(id _Nullable)value completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsUnit(value:completionHandler:)"))); @end @@ -221,41 +221,41 @@ __attribute__((swift_name("AbstractSuspendBridge"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)intAsAnyValue:(KtInt *)value completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("intAsAny(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)unitValue:(KtInt *)value completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("unit(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)unitAsAnyValue:(KtInt *)value completionHandler:(void (^)(KtKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("unitAsAny(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)nullableUnitValue:(KtInt *)value completionHandler:(void (^)(KtKotlinUnit * _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("nullableUnit(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsIntValue:(KtInt *)value completionHandler:(void (^)(KtKotlinNothing * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsInt(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsAnyValue:(KtInt *)value completionHandler:(void (^)(KtKotlinNothing * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsAny(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsUnitValue:(KtInt *)value completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsUnit(value:completionHandler:)"))); @end @@ -273,8 +273,8 @@ __attribute__((swift_name("ThrowCancellationExceptionImpl"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)throwCancellationExceptionWithCompletionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("throwCancellationException(completionHandler:)"))); @end @@ -286,8 +286,8 @@ __attribute__((swift_name("suspendFunctionChild0"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)invokeWithCompletionHandler:(void (^)(NSString * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke(completionHandler:)"))); @end @@ -299,8 +299,8 @@ __attribute__((swift_name("suspendFunctionChild1"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)invokeP1:(NSString *)s completionHandler:(void (^)(NSString * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke(p1:completionHandler:)"))); @end @@ -310,62 +310,62 @@ __attribute__((swift_name("CoroutinesKt"))) @interface KtCoroutinesKt : KtBase /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)suspendFunWithCompletionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)unitSuspendFunWithCompletionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("unitSuspendFun(completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)suspendFunResult:(id _Nullable)result doSuspend:(BOOL)doSuspend doThrow:(BOOL)doThrow completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(result:doSuspend:doThrow:completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)unitSuspendFunDoSuspend:(BOOL)doSuspend doThrow:(BOOL)doThrow completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("unitSuspendFun(doSuspend:doThrow:completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)suspendFunAsyncResult:(id _Nullable)result continuationHolder:(KtContinuationHolder *)continuationHolder completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFunAsync(result:continuationHolder:completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)unitSuspendFunAsyncContinuationHolder:(KtContinuationHolder *)continuationHolder completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("unitSuspendFunAsync(continuationHolder:completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (BOOL)throwExceptionException:(KtKotlinThrowable *)exception error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("throwException(exception:)"))); + (void)callSuspendFunSuspendFun:(id)suspendFun doYield:(BOOL)doYield doThrow:(BOOL)doThrow resultHolder:(KtResultHolder *)resultHolder __attribute__((swift_name("callSuspendFun(suspendFun:doYield:doThrow:resultHolder:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)callSuspendFun2SuspendFun:(id)suspendFun doYield:(BOOL)doYield doThrow:(BOOL)doThrow completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("callSuspendFun2(suspendFun:doYield:doThrow:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)callSuspendBridgeBridge:(KtAbstractSuspendBridge *)bridge resultHolder:(KtResultHolder *)resultHolder error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("callSuspendBridge(bridge:resultHolder:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)throwCancellationExceptionWithCompletionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("throwCancellationException(completionHandler:)"))); + (id)getSuspendLambda0 __attribute__((swift_name("getSuspendLambda0()"))); @@ -376,8 +376,8 @@ __attribute__((swift_name("CoroutinesKt"))) + (KtsuspendFunctionChild1 *)getSuspendChild1 __attribute__((swift_name("getSuspendChild1()"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)invoke1Block:(id)block argument:(id _Nullable)argument completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke1(block:argument:completionHandler:)"))); + (id)getKSuspendCallableReference0 __attribute__((swift_name("getKSuspendCallableReference0()"))); @@ -694,10 +694,9 @@ __attribute__((swift_name("KdocExportKt"))) * @param a keep intact and return * @return value of [a] * Check for additional comment (note) below - */ -/** - @note This method converts instances of IllegalArgumentException to errors. - Other uncaught Kotlin exceptions are fatal. + * + * @note This method converts instances of IllegalArgumentException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (NSString * _Nullable)whateverA:(NSString *)a error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("whatever(a:)"))); @end @@ -996,6 +995,44 @@ __attribute__((swift_name("KT49937"))) - (NSString *)description __attribute__((swift_name("description()"))); @end +__attribute__((swift_name("MyInterface"))) +@protocol KtMyInterface +@required +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Bar"))) +@interface KtBar : KtBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); + +/** + * My method + * @param nodocParam is one arg + * @param fooParam is second arg + * @param fooParam annotations Foo BugReport(assignedTo="me", status="fixed") + * @return their sum + * + * @note annotations + * Foo + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. + * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +- (void)bazNodocParam:(int32_t)nodocParam fooParam:(int32_t)fooParam completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("baz(nodocParam:fooParam:completionHandler:)"))) __attribute__((deprecated("warning"))); +- (void)notKDoc __attribute__((swift_name("notKDoc()"))); + +/** My property + *** + * + * + * @note annotations + * Foo + * BugReport(assignedTo="me", status="open") +*/ +@property (readonly) NSString *greeting __attribute__((swift_name("greeting"))); +@end + __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("LibraryKt"))) @interface KtLibraryKt : KtBase @@ -1058,8 +1095,8 @@ __attribute__((swift_name("NoAutoreleaseSendHelper"))) - (void)sendBlockBlock:(KtKotlinObject *(^)(void))block __attribute__((swift_name("sendBlock(block:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)sendCompletionWithCompletionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("sendCompletion(completionHandler:)"))); @end @@ -1088,8 +1125,8 @@ __attribute__((swift_name("NoAutoreleaseKotlinSendHelper"))) - (void)sendBlockBlock:(KtKotlinObject *(^)(void))block __attribute__((swift_name("sendBlock(block:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)sendCompletionWithCompletionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("sendCompletion(completionHandler:)"))); @property (readonly) KtKotlinLivenessTracker *kotlinLivenessTracker __attribute__((swift_name("kotlinLivenessTracker"))); @@ -1189,37 +1226,37 @@ __attribute__((swift_name("OverrideKotlinMethodsKt"))) @interface KtOverrideKotlinMethodsKt : KtBase /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test0Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test0(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test1Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test1(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test2Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test2(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test3Obj:(KtOverrideKotlinMethods3 *)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test3(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test4Obj:(KtOverrideKotlinMethods4 *)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test4(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test5Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test5(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test6Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test6(obj:)"))); @end @@ -1229,7 +1266,7 @@ __attribute__((swift_name("OverrideMethodsOfAnyKt"))) @interface KtOverrideMethodsOfAnyKt : KtBase /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testObj:(id)obj other:(id)other swift:(BOOL)swift error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test(obj:other:swift:)"))); @end @@ -1299,7 +1336,7 @@ __attribute__((swift_name("ThrowsThrowableAsError"))) @required /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (BOOL)throwErrorAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("throwError()"))); @end @@ -1309,8 +1346,8 @@ __attribute__((swift_name("ThrowsThrowableAsErrorSuspend"))) @required /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)throwErrorWithCompletionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("throwError(completionHandler:)"))); @end @@ -1327,7 +1364,7 @@ __attribute__((swift_name("ThrowsEmptyKt"))) @interface KtThrowsEmptyKt : KtBase /** - @warning All uncaught Kotlin exceptions are fatal. + * @warning All uncaught Kotlin exceptions are fatal. */ + (BOOL)throwsEmptyAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("throwsEmpty()"))); @end @@ -1512,26 +1549,26 @@ __attribute__((swift_name("SwiftOverridableMethodsWithThrows"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)unitAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("unit()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)nothingAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothing()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("any()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("block()"))); @end @@ -1541,50 +1578,50 @@ __attribute__((swift_name("MethodsWithThrows"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtKotlinNothing * _Nullable)nothingNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothingN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("anyN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("blockN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointer()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointerN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (int32_t)intAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("int()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtLong * _Nullable)longNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("longN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (double)doubleAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("double()"))) __attribute__((swift_error(nonnull_error))); @end @@ -1594,8 +1631,8 @@ __attribute__((swift_name("MethodsWithThrowsUnitCaller"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)callMethods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("call(methods:)"))); @end @@ -1604,80 +1641,80 @@ __attribute__((swift_name("Throwing"))) @interface KtThrowing : KtBase /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (instancetype _Nullable)initWithDoThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("init(doThrow:)"))) __attribute__((objc_designated_initializer)); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)unitAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("unit()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)nothingAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothing()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtKotlinNothing * _Nullable)nothingNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothingN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("any()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("anyN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("block()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("blockN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointer()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointerN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (int32_t)intAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("int()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtLong * _Nullable)longNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("longN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (double)doubleAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("double()"))) __attribute__((swift_error(nonnull_error))); @end @@ -1687,80 +1724,80 @@ __attribute__((swift_name("NotThrowing"))) @interface KtNotThrowing : KtBase /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (instancetype _Nullable)initAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)unitAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("unit()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)nothingAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothing()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtKotlinNothing * _Nullable)nothingNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothingN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("any()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("anyN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("block()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("blockN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointer()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointerN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (int32_t)intAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("int()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtLong * _Nullable)longNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("longN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (double)doubleAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("double()"))) __attribute__((swift_error(nonnull_error))); @end @@ -1770,8 +1807,8 @@ __attribute__((swift_name("ThrowsWithBridgeBase"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)plusOneX:(int32_t)x error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("plusOne(x:)"))); @end @@ -1782,8 +1819,8 @@ __attribute__((swift_name("ThrowsWithBridge"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt * _Nullable)plusOneX:(int32_t)x error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("plusOne(x:)"))); @end @@ -2553,20 +2590,20 @@ __attribute__((swift_name("GH3825"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call0AndReturnError:(NSError * _Nullable * _Nullable)error callback:(KtBoolean *(^)(void))callback __attribute__((swift_name("call0(callback:)"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call1DoThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error callback:(void (^)(void))callback __attribute__((swift_name("call1(doThrow:callback:)"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call2Callback:(void (^)(void))callback doThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("call2(callback:doThrow:)"))); @end @@ -2578,20 +2615,20 @@ __attribute__((swift_name("GH3825KotlinImpl"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call0AndReturnError:(NSError * _Nullable * _Nullable)error callback:(KtBoolean *(^)(void))callback __attribute__((swift_name("call0(callback:)"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call1DoThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error callback:(void (^)(void))callback __attribute__((swift_name("call1(doThrow:callback:)"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call2Callback:(void (^)(void))callback doThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("call2(callback:doThrow:)"))); @end @@ -2671,39 +2708,39 @@ __attribute__((swift_name("ValuesKt"))) + (int64_t)multiplyInt:(int32_t)int_ long:(int64_t)long_ __attribute__((swift_name("multiply(int:long:)"))); /** - @note This method converts instances of MyException, MyError to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException, MyError to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (BOOL)throwExceptionError:(BOOL)error error:(NSError * _Nullable * _Nullable)error_ __attribute__((swift_name("throwException(error:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (KtKotlinObjCErrorException * _Nullable)testSwiftThrowingMethods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testSwiftThrowing(methods:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testSwiftNotThrowingMethods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testSwiftNotThrowing(methods:)"))); /** - @note This method converts instances of MyError to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyError to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (BOOL)callUnitMethods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("callUnit(methods:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)callUnitCallerCaller:(id)caller methods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("callUnitCaller(caller:methods:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testSwiftThrowingTest:(id)test flag:(BOOL)flag error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testSwiftThrowing(test:flag:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testSwiftNotThrowingTest:(id)test error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testSwiftNotThrowing(test:)"))); + (id)same:(id)receiver __attribute__((swift_name("same(_:)"))); @@ -2733,7 +2770,7 @@ __attribute__((swift_name("ValuesKt"))) + (void)fooA:(KtKotlinAtomicReference *)a __attribute__((swift_name("foo(a:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testGH3825Gh3825:(id)gh3825 error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testGH3825(gh3825:)"))); + (NSDictionary *)mapBoolean2String __attribute__((swift_name("mapBoolean2String()"))); diff --git a/kotlin-native/backend.native/tests/objcexport/expectedLazyLegacySuspendUnit.h b/kotlin-native/backend.native/tests/objcexport/expectedLazyLegacySuspendUnit.h index 1bdac80bb3b..8850c9dd114 100644 --- a/kotlin-native/backend.native/tests/objcexport/expectedLazyLegacySuspendUnit.h +++ b/kotlin-native/backend.native/tests/objcexport/expectedLazyLegacySuspendUnit.h @@ -144,8 +144,8 @@ __attribute__((swift_name("SuspendFun"))) @required /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)suspendFunDoYield:(BOOL)doYield doThrow:(BOOL)doThrow completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(doYield:doThrow:completionHandler:)"))); @end @@ -165,52 +165,52 @@ __attribute__((swift_name("SuspendBridge"))) @required /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)intValue:(id _Nullable)value completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("int(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)intAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("intAsAny(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)unitValue:(id _Nullable)value completionHandler:(void (^)(KtKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("unit(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)unitAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("unitAsAny(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)nullableUnitValue:(id _Nullable)value completionHandler:(void (^)(KtKotlinUnit * _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("nullableUnit(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingValue:(id _Nullable)value completionHandler:(void (^)(KtKotlinNothing * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothing(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsIntValue:(id _Nullable)value completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsInt(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsAny(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsUnitValue:(id _Nullable)value completionHandler:(void (^)(KtKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsUnit(value:completionHandler:)"))); @end @@ -221,41 +221,41 @@ __attribute__((swift_name("AbstractSuspendBridge"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)intAsAnyValue:(KtInt *)value completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("intAsAny(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)unitValue:(KtInt *)value completionHandler:(void (^)(KtKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("unit(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)unitAsAnyValue:(KtInt *)value completionHandler:(void (^)(KtKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("unitAsAny(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)nullableUnitValue:(KtInt *)value completionHandler:(void (^)(KtKotlinUnit * _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("nullableUnit(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsIntValue:(KtInt *)value completionHandler:(void (^)(KtKotlinNothing * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsInt(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsAnyValue:(KtInt *)value completionHandler:(void (^)(KtKotlinNothing * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsAny(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsUnitValue:(KtInt *)value completionHandler:(void (^)(KtKotlinNothing * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsUnit(value:completionHandler:)"))); @end @@ -273,8 +273,8 @@ __attribute__((swift_name("ThrowCancellationExceptionImpl"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)throwCancellationExceptionWithCompletionHandler:(void (^)(KtKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("throwCancellationException(completionHandler:)"))); @end @@ -286,8 +286,8 @@ __attribute__((swift_name("suspendFunctionChild0"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)invokeWithCompletionHandler:(void (^)(NSString * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke(completionHandler:)"))); @end @@ -299,8 +299,8 @@ __attribute__((swift_name("suspendFunctionChild1"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)invokeP1:(NSString *)s completionHandler:(void (^)(NSString * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke(p1:completionHandler:)"))); @end @@ -310,62 +310,62 @@ __attribute__((swift_name("CoroutinesKt"))) @interface KtCoroutinesKt : KtBase /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)suspendFunWithCompletionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)unitSuspendFunWithCompletionHandler:(void (^)(KtKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("unitSuspendFun(completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)suspendFunResult:(id _Nullable)result doSuspend:(BOOL)doSuspend doThrow:(BOOL)doThrow completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(result:doSuspend:doThrow:completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)unitSuspendFunDoSuspend:(BOOL)doSuspend doThrow:(BOOL)doThrow completionHandler:(void (^)(KtKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("unitSuspendFun(doSuspend:doThrow:completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)suspendFunAsyncResult:(id _Nullable)result continuationHolder:(KtContinuationHolder *)continuationHolder completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFunAsync(result:continuationHolder:completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)unitSuspendFunAsyncContinuationHolder:(KtContinuationHolder *)continuationHolder completionHandler:(void (^)(KtKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("unitSuspendFunAsync(continuationHolder:completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (BOOL)throwExceptionException:(KtKotlinThrowable *)exception error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("throwException(exception:)"))); + (void)callSuspendFunSuspendFun:(id)suspendFun doYield:(BOOL)doYield doThrow:(BOOL)doThrow resultHolder:(KtResultHolder *)resultHolder __attribute__((swift_name("callSuspendFun(suspendFun:doYield:doThrow:resultHolder:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)callSuspendFun2SuspendFun:(id)suspendFun doYield:(BOOL)doYield doThrow:(BOOL)doThrow completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("callSuspendFun2(suspendFun:doYield:doThrow:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)callSuspendBridgeBridge:(KtAbstractSuspendBridge *)bridge resultHolder:(KtResultHolder *)resultHolder error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("callSuspendBridge(bridge:resultHolder:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)throwCancellationExceptionWithCompletionHandler:(void (^)(KtKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("throwCancellationException(completionHandler:)"))); + (id)getSuspendLambda0 __attribute__((swift_name("getSuspendLambda0()"))); @@ -376,8 +376,8 @@ __attribute__((swift_name("CoroutinesKt"))) + (KtsuspendFunctionChild1 *)getSuspendChild1 __attribute__((swift_name("getSuspendChild1()"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)invoke1Block:(id)block argument:(id _Nullable)argument completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke1(block:argument:completionHandler:)"))); + (id)getKSuspendCallableReference0 __attribute__((swift_name("getKSuspendCallableReference0()"))); @@ -638,8 +638,8 @@ __attribute__((swift_name("KdocExportKt"))) @interface KtKdocExportKt : KtBase /** - @note This method converts instances of IllegalArgumentException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of IllegalArgumentException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (NSString * _Nullable)whateverA:(NSString *)a error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("whatever(a:)"))); @end @@ -938,6 +938,36 @@ __attribute__((swift_name("KT49937"))) - (NSString *)description __attribute__((swift_name("description()"))); @end +__attribute__((swift_name("MyInterface"))) +@protocol KtMyInterface +@required +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Bar"))) +@interface KtBar : KtBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); + +/** + * @note annotations + * Foo + * @param fooParam annotations Foo BugReport(assignedTo="me", status="fixed") + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. + * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +- (void)bazNodocParam:(int32_t)nodocParam fooParam:(int32_t)fooParam completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("baz(nodocParam:fooParam:completionHandler:)"))) __attribute__((deprecated("warning"))); +- (void)notKDoc __attribute__((swift_name("notKDoc()"))); + +/** + * @note annotations + * Foo + * BugReport(assignedTo="me", status="open") +*/ +@property (readonly) NSString *greeting __attribute__((swift_name("greeting"))); +@end + __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("LibraryKt"))) @interface KtLibraryKt : KtBase @@ -1000,8 +1030,8 @@ __attribute__((swift_name("NoAutoreleaseSendHelper"))) - (void)sendBlockBlock:(KtKotlinObject *(^)(void))block __attribute__((swift_name("sendBlock(block:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)sendCompletionWithCompletionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("sendCompletion(completionHandler:)"))); @end @@ -1030,8 +1060,8 @@ __attribute__((swift_name("NoAutoreleaseKotlinSendHelper"))) - (void)sendBlockBlock:(KtKotlinObject *(^)(void))block __attribute__((swift_name("sendBlock(block:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)sendCompletionWithCompletionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("sendCompletion(completionHandler:)"))); @property (readonly) KtKotlinLivenessTracker *kotlinLivenessTracker __attribute__((swift_name("kotlinLivenessTracker"))); @@ -1131,37 +1161,37 @@ __attribute__((swift_name("OverrideKotlinMethodsKt"))) @interface KtOverrideKotlinMethodsKt : KtBase /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test0Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test0(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test1Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test1(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test2Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test2(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test3Obj:(KtOverrideKotlinMethods3 *)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test3(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test4Obj:(KtOverrideKotlinMethods4 *)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test4(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test5Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test5(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test6Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test6(obj:)"))); @end @@ -1171,7 +1201,7 @@ __attribute__((swift_name("OverrideMethodsOfAnyKt"))) @interface KtOverrideMethodsOfAnyKt : KtBase /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testObj:(id)obj other:(id)other swift:(BOOL)swift error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test(obj:other:swift:)"))); @end @@ -1241,7 +1271,7 @@ __attribute__((swift_name("ThrowsThrowableAsError"))) @required /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (BOOL)throwErrorAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("throwError()"))); @end @@ -1251,8 +1281,8 @@ __attribute__((swift_name("ThrowsThrowableAsErrorSuspend"))) @required /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)throwErrorWithCompletionHandler:(void (^)(KtKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("throwError(completionHandler:)"))); @end @@ -1269,7 +1299,7 @@ __attribute__((swift_name("ThrowsEmptyKt"))) @interface KtThrowsEmptyKt : KtBase /** - @warning All uncaught Kotlin exceptions are fatal. + * @warning All uncaught Kotlin exceptions are fatal. */ + (BOOL)throwsEmptyAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("throwsEmpty()"))); @end @@ -1454,26 +1484,26 @@ __attribute__((swift_name("SwiftOverridableMethodsWithThrows"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)unitAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("unit()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)nothingAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothing()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("any()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("block()"))); @end @@ -1483,50 +1513,50 @@ __attribute__((swift_name("MethodsWithThrows"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtKotlinNothing * _Nullable)nothingNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothingN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("anyN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("blockN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointer()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointerN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (int32_t)intAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("int()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtLong * _Nullable)longNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("longN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (double)doubleAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("double()"))) __attribute__((swift_error(nonnull_error))); @end @@ -1536,8 +1566,8 @@ __attribute__((swift_name("MethodsWithThrowsUnitCaller"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)callMethods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("call(methods:)"))); @end @@ -1546,80 +1576,80 @@ __attribute__((swift_name("Throwing"))) @interface KtThrowing : KtBase /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (instancetype _Nullable)initWithDoThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("init(doThrow:)"))) __attribute__((objc_designated_initializer)); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)unitAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("unit()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)nothingAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothing()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtKotlinNothing * _Nullable)nothingNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothingN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("any()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("anyN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("block()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("blockN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointer()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointerN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (int32_t)intAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("int()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtLong * _Nullable)longNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("longN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (double)doubleAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("double()"))) __attribute__((swift_error(nonnull_error))); @end @@ -1629,80 +1659,80 @@ __attribute__((swift_name("NotThrowing"))) @interface KtNotThrowing : KtBase /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (instancetype _Nullable)initAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)unitAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("unit()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)nothingAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothing()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtKotlinNothing * _Nullable)nothingNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothingN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("any()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("anyN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("block()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("blockN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointer()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointerN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (int32_t)intAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("int()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtLong * _Nullable)longNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("longN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (double)doubleAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("double()"))) __attribute__((swift_error(nonnull_error))); @end @@ -1712,8 +1742,8 @@ __attribute__((swift_name("ThrowsWithBridgeBase"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)plusOneX:(int32_t)x error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("plusOne(x:)"))); @end @@ -1724,8 +1754,8 @@ __attribute__((swift_name("ThrowsWithBridge"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt * _Nullable)plusOneX:(int32_t)x error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("plusOne(x:)"))); @end @@ -2495,20 +2525,20 @@ __attribute__((swift_name("GH3825"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call0AndReturnError:(NSError * _Nullable * _Nullable)error callback:(KtBoolean *(^)(void))callback __attribute__((swift_name("call0(callback:)"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call1DoThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error callback:(void (^)(void))callback __attribute__((swift_name("call1(doThrow:callback:)"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call2Callback:(void (^)(void))callback doThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("call2(callback:doThrow:)"))); @end @@ -2520,20 +2550,20 @@ __attribute__((swift_name("GH3825KotlinImpl"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call0AndReturnError:(NSError * _Nullable * _Nullable)error callback:(KtBoolean *(^)(void))callback __attribute__((swift_name("call0(callback:)"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call1DoThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error callback:(void (^)(void))callback __attribute__((swift_name("call1(doThrow:callback:)"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call2Callback:(void (^)(void))callback doThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("call2(callback:doThrow:)"))); @end @@ -2613,39 +2643,39 @@ __attribute__((swift_name("ValuesKt"))) + (int64_t)multiplyInt:(int32_t)int_ long:(int64_t)long_ __attribute__((swift_name("multiply(int:long:)"))); /** - @note This method converts instances of MyException, MyError to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException, MyError to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (BOOL)throwExceptionError:(BOOL)error error:(NSError * _Nullable * _Nullable)error_ __attribute__((swift_name("throwException(error:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (KtKotlinObjCErrorException * _Nullable)testSwiftThrowingMethods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testSwiftThrowing(methods:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testSwiftNotThrowingMethods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testSwiftNotThrowing(methods:)"))); /** - @note This method converts instances of MyError to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyError to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (BOOL)callUnitMethods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("callUnit(methods:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)callUnitCallerCaller:(id)caller methods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("callUnitCaller(caller:methods:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testSwiftThrowingTest:(id)test flag:(BOOL)flag error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testSwiftThrowing(test:flag:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testSwiftNotThrowingTest:(id)test error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testSwiftNotThrowing(test:)"))); + (id)same:(id)receiver __attribute__((swift_name("same(_:)"))); @@ -2675,7 +2705,7 @@ __attribute__((swift_name("ValuesKt"))) + (void)fooA:(KtKotlinAtomicReference *)a __attribute__((swift_name("foo(a:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testGH3825Gh3825:(id)gh3825 error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testGH3825(gh3825:)"))); + (NSDictionary *)mapBoolean2String __attribute__((swift_name("mapBoolean2String()"))); diff --git a/kotlin-native/backend.native/tests/objcexport/expectedLazyNoGenerics.h b/kotlin-native/backend.native/tests/objcexport/expectedLazyNoGenerics.h index 77ec0142003..4c33c1d1515 100644 --- a/kotlin-native/backend.native/tests/objcexport/expectedLazyNoGenerics.h +++ b/kotlin-native/backend.native/tests/objcexport/expectedLazyNoGenerics.h @@ -144,8 +144,8 @@ __attribute__((swift_name("SuspendFun"))) @required /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)suspendFunDoYield:(BOOL)doYield doThrow:(BOOL)doThrow completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(doYield:doThrow:completionHandler:)"))); @end @@ -165,52 +165,52 @@ __attribute__((swift_name("SuspendBridge"))) @required /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)intValue:(id _Nullable)value completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("int(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)intAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("intAsAny(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)unitValue:(id _Nullable)value completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("unit(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)unitAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("unitAsAny(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)nullableUnitValue:(id _Nullable)value completionHandler:(void (^)(KtKotlinUnit * _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("nullableUnit(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingValue:(id _Nullable)value completionHandler:(void (^)(KtKotlinNothing * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothing(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsIntValue:(id _Nullable)value completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsInt(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsAny(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsUnitValue:(id _Nullable)value completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsUnit(value:completionHandler:)"))); @end @@ -221,41 +221,41 @@ __attribute__((swift_name("AbstractSuspendBridge"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)intAsAnyValue:(KtInt *)value completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("intAsAny(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)unitValue:(KtInt *)value completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("unit(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)unitAsAnyValue:(KtInt *)value completionHandler:(void (^)(KtKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("unitAsAny(value:completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)nullableUnitValue:(KtInt *)value completionHandler:(void (^)(KtKotlinUnit * _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("nullableUnit(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsIntValue:(KtInt *)value completionHandler:(void (^)(KtKotlinNothing * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsInt(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsAnyValue:(KtInt *)value completionHandler:(void (^)(KtKotlinNothing * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsAny(value:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (void)nothingAsUnitValue:(KtInt *)value completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsUnit(value:completionHandler:)"))); @end @@ -273,8 +273,8 @@ __attribute__((swift_name("ThrowCancellationExceptionImpl"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)throwCancellationExceptionWithCompletionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("throwCancellationException(completionHandler:)"))); @end @@ -286,8 +286,8 @@ __attribute__((swift_name("suspendFunctionChild0"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)invokeWithCompletionHandler:(void (^)(NSString * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke(completionHandler:)"))); @end @@ -299,8 +299,8 @@ __attribute__((swift_name("suspendFunctionChild1"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)invokeP1:(NSString *)s completionHandler:(void (^)(NSString * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke(p1:completionHandler:)"))); @end @@ -310,62 +310,62 @@ __attribute__((swift_name("CoroutinesKt"))) @interface KtCoroutinesKt : KtBase /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)suspendFunWithCompletionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(completionHandler:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)unitSuspendFunWithCompletionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("unitSuspendFun(completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)suspendFunResult:(id _Nullable)result doSuspend:(BOOL)doSuspend doThrow:(BOOL)doThrow completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(result:doSuspend:doThrow:completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)unitSuspendFunDoSuspend:(BOOL)doSuspend doThrow:(BOOL)doThrow completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("unitSuspendFun(doSuspend:doThrow:completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)suspendFunAsyncResult:(id _Nullable)result continuationHolder:(KtContinuationHolder *)continuationHolder completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFunAsync(result:continuationHolder:completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)unitSuspendFunAsyncContinuationHolder:(KtContinuationHolder *)continuationHolder completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("unitSuspendFunAsync(continuationHolder:completionHandler:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (BOOL)throwExceptionException:(KtKotlinThrowable *)exception error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("throwException(exception:)"))); + (void)callSuspendFunSuspendFun:(id)suspendFun doYield:(BOOL)doYield doThrow:(BOOL)doThrow resultHolder:(KtResultHolder *)resultHolder __attribute__((swift_name("callSuspendFun(suspendFun:doYield:doThrow:resultHolder:)"))); /** - @note This method converts instances of CoroutineException, CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CoroutineException, CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)callSuspendFun2SuspendFun:(id)suspendFun doYield:(BOOL)doYield doThrow:(BOOL)doThrow completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("callSuspendFun2(suspendFun:doYield:doThrow:completionHandler:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)callSuspendBridgeBridge:(KtAbstractSuspendBridge *)bridge resultHolder:(KtResultHolder *)resultHolder error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("callSuspendBridge(bridge:resultHolder:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)throwCancellationExceptionWithCompletionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("throwCancellationException(completionHandler:)"))); + (id)getSuspendLambda0 __attribute__((swift_name("getSuspendLambda0()"))); @@ -376,8 +376,8 @@ __attribute__((swift_name("CoroutinesKt"))) + (KtsuspendFunctionChild1 *)getSuspendChild1 __attribute__((swift_name("getSuspendChild1()"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (void)invoke1Block:(id)block argument:(id _Nullable)argument completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke1(block:argument:completionHandler:)"))); + (id)getKSuspendCallableReference0 __attribute__((swift_name("getKSuspendCallableReference0()"))); @@ -638,8 +638,8 @@ __attribute__((swift_name("KdocExportKt"))) @interface KtKdocExportKt : KtBase /** - @note This method converts instances of IllegalArgumentException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of IllegalArgumentException to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (NSString * _Nullable)whateverA:(NSString *)a error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("whatever(a:)"))); @end @@ -938,6 +938,36 @@ __attribute__((swift_name("KT49937"))) - (NSString *)description __attribute__((swift_name("description()"))); @end +__attribute__((swift_name("MyInterface"))) +@protocol KtMyInterface +@required +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Bar"))) +@interface KtBar : KtBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); + +/** + * @note annotations + * Foo + * @param fooParam annotations Foo BugReport(assignedTo="me", status="fixed") + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. + * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +- (void)bazNodocParam:(int32_t)nodocParam fooParam:(int32_t)fooParam completionHandler:(void (^)(KtInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("baz(nodocParam:fooParam:completionHandler:)"))) __attribute__((deprecated("warning"))); +- (void)notKDoc __attribute__((swift_name("notKDoc()"))); + +/** + * @note annotations + * Foo + * BugReport(assignedTo="me", status="open") +*/ +@property (readonly) NSString *greeting __attribute__((swift_name("greeting"))); +@end + __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("LibraryKt"))) @interface KtLibraryKt : KtBase @@ -1000,8 +1030,8 @@ __attribute__((swift_name("NoAutoreleaseSendHelper"))) - (void)sendBlockBlock:(KtKotlinObject *(^)(void))block __attribute__((swift_name("sendBlock(block:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)sendCompletionWithCompletionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("sendCompletion(completionHandler:)"))); @end @@ -1030,8 +1060,8 @@ __attribute__((swift_name("NoAutoreleaseKotlinSendHelper"))) - (void)sendBlockBlock:(KtKotlinObject *(^)(void))block __attribute__((swift_name("sendBlock(block:)"))); /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)sendCompletionWithCompletionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("sendCompletion(completionHandler:)"))); @property (readonly) KtKotlinLivenessTracker *kotlinLivenessTracker __attribute__((swift_name("kotlinLivenessTracker"))); @@ -1131,37 +1161,37 @@ __attribute__((swift_name("OverrideKotlinMethodsKt"))) @interface KtOverrideKotlinMethodsKt : KtBase /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test0Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test0(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test1Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test1(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test2Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test2(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test3Obj:(KtOverrideKotlinMethods3 *)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test3(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test4Obj:(KtOverrideKotlinMethods4 *)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test4(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test5Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test5(obj:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)test6Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test6(obj:)"))); @end @@ -1171,7 +1201,7 @@ __attribute__((swift_name("OverrideMethodsOfAnyKt"))) @interface KtOverrideMethodsOfAnyKt : KtBase /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testObj:(id)obj other:(id)other swift:(BOOL)swift error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test(obj:other:swift:)"))); @end @@ -1241,7 +1271,7 @@ __attribute__((swift_name("ThrowsThrowableAsError"))) @required /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ - (BOOL)throwErrorAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("throwError()"))); @end @@ -1251,8 +1281,8 @@ __attribute__((swift_name("ThrowsThrowableAsErrorSuspend"))) @required /** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void)throwErrorWithCompletionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("throwError(completionHandler:)"))); @end @@ -1269,7 +1299,7 @@ __attribute__((swift_name("ThrowsEmptyKt"))) @interface KtThrowsEmptyKt : KtBase /** - @warning All uncaught Kotlin exceptions are fatal. + * @warning All uncaught Kotlin exceptions are fatal. */ + (BOOL)throwsEmptyAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("throwsEmpty()"))); @end @@ -1454,26 +1484,26 @@ __attribute__((swift_name("SwiftOverridableMethodsWithThrows"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)unitAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("unit()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)nothingAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothing()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("any()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("block()"))); @end @@ -1483,50 +1513,50 @@ __attribute__((swift_name("MethodsWithThrows"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtKotlinNothing * _Nullable)nothingNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothingN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("anyN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("blockN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointer()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointerN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (int32_t)intAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("int()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtLong * _Nullable)longNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("longN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (double)doubleAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("double()"))) __attribute__((swift_error(nonnull_error))); @end @@ -1536,8 +1566,8 @@ __attribute__((swift_name("MethodsWithThrowsUnitCaller"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)callMethods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("call(methods:)"))); @end @@ -1546,80 +1576,80 @@ __attribute__((swift_name("Throwing"))) @interface KtThrowing : KtBase /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (instancetype _Nullable)initWithDoThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("init(doThrow:)"))) __attribute__((objc_designated_initializer)); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)unitAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("unit()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)nothingAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothing()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtKotlinNothing * _Nullable)nothingNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothingN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("any()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("anyN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("block()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("blockN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointer()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointerN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (int32_t)intAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("int()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtLong * _Nullable)longNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("longN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (double)doubleAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("double()"))) __attribute__((swift_error(nonnull_error))); @end @@ -1629,80 +1659,80 @@ __attribute__((swift_name("NotThrowing"))) @interface KtNotThrowing : KtBase /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (instancetype _Nullable)initAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)unitAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("unit()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)nothingAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothing()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtKotlinNothing * _Nullable)nothingNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("nothingN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("any()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)anyNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("anyN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("block()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt *(^ _Nullable)(void))blockNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("blockN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointer()"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (void * _Nullable)pointerNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("pointerN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (int32_t)intAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("int()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtLong * _Nullable)longNAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("longN()"))) __attribute__((swift_error(nonnull_error))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (double)doubleAndReturnError:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("double()"))) __attribute__((swift_error(nonnull_error))); @end @@ -1712,8 +1742,8 @@ __attribute__((swift_name("ThrowsWithBridgeBase"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (id _Nullable)plusOneX:(int32_t)x error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("plusOne(x:)"))); @end @@ -1724,8 +1754,8 @@ __attribute__((swift_name("ThrowsWithBridge"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (KtInt * _Nullable)plusOneX:(int32_t)x error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("plusOne(x:)"))); @end @@ -2495,20 +2525,20 @@ __attribute__((swift_name("GH3825"))) @required /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call0AndReturnError:(NSError * _Nullable * _Nullable)error callback:(KtBoolean *(^)(void))callback __attribute__((swift_name("call0(callback:)"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call1DoThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error callback:(void (^)(void))callback __attribute__((swift_name("call1(doThrow:callback:)"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call2Callback:(void (^)(void))callback doThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("call2(callback:doThrow:)"))); @end @@ -2520,20 +2550,20 @@ __attribute__((swift_name("GH3825KotlinImpl"))) + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call0AndReturnError:(NSError * _Nullable * _Nullable)error callback:(KtBoolean *(^)(void))callback __attribute__((swift_name("call0(callback:)"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call1DoThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error callback:(void (^)(void))callback __attribute__((swift_name("call1(doThrow:callback:)"))); /** - @note This method converts instances of MyException to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException to errors. + * Other uncaught Kotlin exceptions are fatal. */ - (BOOL)call2Callback:(void (^)(void))callback doThrow:(BOOL)doThrow error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("call2(callback:doThrow:)"))); @end @@ -2613,39 +2643,39 @@ __attribute__((swift_name("ValuesKt"))) + (int64_t)multiplyInt:(int32_t)int_ long:(int64_t)long_ __attribute__((swift_name("multiply(int:long:)"))); /** - @note This method converts instances of MyException, MyError to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyException, MyError to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (BOOL)throwExceptionError:(BOOL)error error:(NSError * _Nullable * _Nullable)error_ __attribute__((swift_name("throwException(error:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (KtKotlinObjCErrorException * _Nullable)testSwiftThrowingMethods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testSwiftThrowing(methods:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testSwiftNotThrowingMethods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testSwiftNotThrowing(methods:)"))); /** - @note This method converts instances of MyError to errors. - Other uncaught Kotlin exceptions are fatal. + * @note This method converts instances of MyError to errors. + * Other uncaught Kotlin exceptions are fatal. */ + (BOOL)callUnitMethods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("callUnit(methods:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)callUnitCallerCaller:(id)caller methods:(id)methods error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("callUnitCaller(caller:methods:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testSwiftThrowingTest:(id)test flag:(BOOL)flag error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testSwiftThrowing(test:flag:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testSwiftNotThrowingTest:(id)test error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testSwiftNotThrowing(test:)"))); + (id)same:(id)receiver __attribute__((swift_name("same(_:)"))); @@ -2675,7 +2705,7 @@ __attribute__((swift_name("ValuesKt"))) + (void)fooA:(KtKotlinAtomicReference *)a __attribute__((swift_name("foo(a:)"))); /** - @note This method converts all Kotlin exceptions to errors. + * @note This method converts all Kotlin exceptions to errors. */ + (BOOL)testGH3825Gh3825:(id)gh3825 error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("testGH3825(gh3825:)"))); + (NSDictionary *)mapBoolean2String __attribute__((swift_name("mapBoolean2String()"))); diff --git a/kotlin-native/backend.native/tests/objcexport/kt51593.kt b/kotlin-native/backend.native/tests/objcexport/kt51593.kt new file mode 100644 index 00000000000..659960d1c8b --- /dev/null +++ b/kotlin-native/backend.native/tests/objcexport/kt51593.kt @@ -0,0 +1,53 @@ +/* + * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ +@file:MyCustomFileAspect(type = "kt") + +@Target(AnnotationTarget.FILE) +annotation class MyCustomFileAspect(val type: String = "kt") + +annotation class NoDoc +@MustBeDocumented +annotation class Foo +@MustBeDocumented +annotation class BugReport( + val assignedTo: String = "[none]", + val status: String = "open" +) + +@NoDoc +@Foo +@BugReport(assignedTo = "me", status = "open") +interface MyInterface { +} + +@NoDoc +@Foo +@BugReport(assignedTo = "me", status = "open") +class Bar { + @NoDoc + @Foo + @Deprecated("warning", level = DeprecationLevel.WARNING) + /** + * My method + * @param nodocParam is one arg + * @param fooParam is second arg + * @return their sum + */ + protected suspend fun baz (@NoDoc nodocParam:Int, @Foo @BugReport(assignedTo = "me", status = "fixed") fooParam:Int): Int { return nodocParam + fooParam } + + /** My property + *** + * + */ + @Foo + @BugReport(assignedTo = "me", status = "open") + val greeting: String + get() { + return "Hello World!" + } + + // Not a kDoc-formatted comment + fun notKDoc() {} +}