Skip to content

Commit

Permalink
Merge branch 'main-1.x' into lucmcdon/python-poc
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas McDonald committed Oct 13, 2023
2 parents f27a49f + 8a254c5 commit f9f5b5a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ public TypeConverter generateUnionConverter(final UnionShape unionShape) {
destructorValue = DafnyNameResolverHelpers.dafnyCompilesExtra_(memberShape.getMemberName());
}
return TokenTree
.of("if (value.is_%s)".formatted(memberShape.getMemberName()))
.of("if (value.is_%s)".formatted(DafnyNameResolverHelpers.dafnyCompilesExtra_(memberShape.getMemberName())))
.append(TokenTree
.of(
"converted.%s = %s(concrete.dtor_%s);"
Expand Down Expand Up @@ -637,7 +637,7 @@ public TypeConverter generateUnionConverter(final UnionShape unionShape) {
.of("if (value.Is%sSet)".formatted(propertyName));
} else if (listTypes.contains(propertyName)) {
checkIfValuePresent = TokenTree
.of("if (!value.%s.Any())".formatted(propertyName));
.of("if (value.%s.Any())".formatted(propertyName));
} else if ("NULL".equals(propertyName)) {
checkIfValuePresent = TokenTree
.of("if (value.%s == true)".formatted(propertyName));
Expand Down

0 comments on commit f9f5b5a

Please sign in to comment.