KT-65897: add exporting of kotlin constructors as Swift constructors #KT-65897 fixed

Merge-request: KT-MR-14734
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
This commit is contained in:
Artem Olkov
2024-03-14 12:21:39 +00:00
committed by Space Team
parent bbcc5c9aed
commit fcc4470b74
18 changed files with 544 additions and 19 deletions
@@ -81,6 +81,18 @@ object SwiftIrTree : AbstractSwiftIrTreeBuilder() {
+field("body", functionBodyType, nullable = true, mutable = true)
}
val init by element {
customParentInVisitor = callable
parent(callable)
+field("isFailable", boolean)
+listField("parameters", parameterType)
+field("initKind", initKind)
+field(name = "documentation", string, nullable = true, mutable = true)
}
val function by element {
customParentInVisitor = callable
parent(callable)
@@ -16,6 +16,7 @@ val typeType = type(BASE_PACKAGE, "SirType", TypeKind.Class)
val enumCaseType = type(BASE_PACKAGE, "SirEnumCase", TypeKind.Class)
val functionBodyType = type(BASE_PACKAGE, "SirFunctionBody", TypeKind.Class)
val callableKind = type(BASE_PACKAGE, "SirCallableKind", TypeKind.Class)
val initKind = type(BASE_PACKAGE, "SirInitializerKind", TypeKind.Class)
private const val VISITORS_PACKAGE = "$BASE_PACKAGE.visitors"