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:
+12
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user