Skip to content

Commit

Permalink
fix: return type normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
j178 committed Apr 7, 2024
1 parent 19a7eb1 commit 3e00607
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions leetcode/question.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ func (m *MetaData) normalize() {
if m.Return != nil {
m.Return.Type = normalizeType(m.Return.Type)
}
for _, method := range m.Methods {
for i, param := range method.Params {
method.Params[i].Type = normalizeType(param.Type)
for i, method := range m.Methods {
for j, param := range method.Params {
m.Methods[i].Params[j].Type = normalizeType(param.Type)
}
method.Return.Type = normalizeType(method.Return.Type)
m.Methods[i].Return.Type = normalizeType(method.Return.Type)
}
}

Expand Down

0 comments on commit 3e00607

Please sign in to comment.