Skip to content

Commit 99e6891

Browse files
authored
Add a public initializer for structures with no members. (#417)
1 parent 46e2e69 commit 99e6891

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/StructureGenerator.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ class StructureGenerator(
150150
writer.write("self.\$1L = \$1L", memberName)
151151
}
152152
}
153+
} else {
154+
writer.write("public init () { }")
153155
}
154156
}
155157

0 commit comments

Comments
 (0)