Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,18 @@ private GoWriter.Writable generateResolveMethodBody(EndpointRuleSet ruleset) {
continue;
}
switch (param.getType()) {
case STRING, BOOLEAN ->
case STRING, BOOLEAN -> {
w.write("$L := *$L",
getLocalVarParameterName(param), getMemberParameterName(param));
// even if the parameter is required, it's not guaranteed that it will be used
// so we generate a blank identifier to prevent a compiler error if the
// variable is not used
w.write("_ = $L", getLocalVarParameterName(param));
}
case STRING_ARRAY -> {
w.write("$L := stringSlice($L)",
getLocalVarParameterName(param), getMemberParameterName(param));
w.write("_ = $L", getLocalVarParameterName(param));
}
default -> throw new CodegenException("unrecognized parameter type");
}
Expand Down
Loading