Skip to content

Commit

Permalink
fix: generated names (#2852)
Browse files Browse the repository at this point in the history
  • Loading branch information
worstell authored Sep 26, 2024
1 parent 4ad4d48 commit 1bba467
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions go-runtime/compile/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ func genTypeWithNativeNames(module *schema.Module, t schema.Type, nativeNames ex
if i != 0 {
desc += ", "
}
desc += genType(module, tp)
desc += genTypeWithNativeNames(module, tp, nativeNames)
}
desc += "]"
}
Expand All @@ -1040,13 +1040,13 @@ func genTypeWithNativeNames(module *schema.Module, t schema.Type, nativeNames ex
return strings.ToLower(t.String())

case *schema.Array:
return "[]" + genType(module, t.Element)
return "[]" + genTypeWithNativeNames(module, t.Element, nativeNames)

case *schema.Map:
return "map[" + genType(module, t.Key) + "]" + genType(module, t.Value)
return "map[" + genTypeWithNativeNames(module, t.Key, nativeNames) + "]" + genType(module, t.Value)

case *schema.Optional:
return "ftl.Option[" + genType(module, t.Type) + "]"
return "ftl.Option[" + genTypeWithNativeNames(module, t.Type, nativeNames) + "]"

case *schema.Unit:
return "ftl.Unit"
Expand Down

0 comments on commit 1bba467

Please sign in to comment.