diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/localservice/shapevisitor/SmithyToDafnyShapeVisitor.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/localservice/shapevisitor/SmithyToDafnyShapeVisitor.java index df9ef3c9f..afd37a749 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/localservice/shapevisitor/SmithyToDafnyShapeVisitor.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/localservice/shapevisitor/SmithyToDafnyShapeVisitor.java @@ -117,7 +117,7 @@ protected String referenceStructureShape(final StructureShape shape) { final var goCodeBlock = """ func () Wrappers.Option { - if %s == nil { + if (%s) == nil { return Wrappers.Companion_Option_.Create_None_() } return Wrappers.Companion_Option_.Create_Some_(%s) @@ -155,7 +155,7 @@ protected String referenceStructureShape(final StructureShape shape) { final var goCodeBlock = """ func () Wrappers.Option { - if %s == nil { + if (%s) == nil { return Wrappers.Companion_Option_.Create_None_() } return Wrappers.Companion_Option_.Create_Some_(%s)