From 1bba4675e022f764a5ade82535479e2dbc7a246c Mon Sep 17 00:00:00 2001 From: worstell Date: Thu, 26 Sep 2024 16:23:50 -0700 Subject: [PATCH] fix: generated names (#2852) --- go-runtime/compile/build.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/go-runtime/compile/build.go b/go-runtime/compile/build.go index 6ba19b7e6d..97ba8be38f 100644 --- a/go-runtime/compile/build.go +++ b/go-runtime/compile/build.go @@ -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 += "]" } @@ -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"