Skip to content

Commit

Permalink
Override template ref to be any instead of interface{}
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Coffman <steve@khanacademy.org>
  • Loading branch information
StevenACoffman committed Jan 7, 2025
1 parent 630f3e9 commit 413b8d2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion codegen/templates/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,13 @@ func isDelimiter(c rune) bool {
}

func ref(p types.Type) string {
return CurrentImports.LookupType(p)
typeString := CurrentImports.LookupType(p)
// TODO(steve): figure out why this is needed
// otherwise inconsistent sometimes
if typeString == "interface{}" {
return "any"
}
return typeString
}

func obj(obj types.Object) string {
Expand Down

0 comments on commit 413b8d2

Please sign in to comment.