Skip to content

Commit

Permalink
Fix static member variable
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurcro committed Oct 21, 2024
1 parent 88dd694 commit 4452d7c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ extension TypesFileTranslator {
let enumCaseDesc = EnumCaseDescription(name: enumCaseName, kind: .nameWithAssociatedValues(associatedValues))
let enumCaseDecl: Declaration = .commentable(enumCaseDocComment, .enumCase(enumCaseDesc))

var staticMemberDecl: Declaration?
let staticMemberDecl: Declaration?
let responseHasNoHeaders = typedResponse.response.headers?.isEmpty ?? true
let responseHasNoContent = typedResponse.response.content.isEmpty
if responseHasNoContent && responseHasNoHeaders && !responseKind.wantsStatusCode {
Expand All @@ -83,6 +83,8 @@ extension TypesFileTranslator {
]
)
staticMemberDecl = .commentable(enumCaseDocComment, .variable(staticMemberDesc))
} else {
staticMemberDecl = nil
}

let throwingGetterDesc = VariableDescription(
Expand Down

0 comments on commit 4452d7c

Please sign in to comment.