Skip to content

Commit

Permalink
Fix map value types
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdaffurn committed Sep 12, 2024
1 parent ed06fbe commit c73fa0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public Type buildType(org.jboss.jandex.Type type, boolean export) {
} else if (paramType.name().equals(DotName.createSimple(Map.class))) {
return Type.newBuilder().setMap(xyz.block.ftl.v1.schema.Map.newBuilder()
.setKey(buildType(paramType.arguments().get(0), export))
.setValue(buildType(paramType.arguments().get(0), export)))
.setValue(buildType(paramType.arguments().get(1), export)))
.build();
} else if (paramType.name().equals(DotNames.OPTIONAL)) {
//TODO: optional kinda sucks
Expand Down
3 changes: 1 addition & 2 deletions jvm-runtime/jvm_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ func TestJVMToGoCall(t *testing.T) {
})...)
tests = append(tests, PairedVerbTest("testObjectVerb", exampleObject)...)
tests = append(tests, PairedVerbTest("testObjectOptionalFieldsVerb", exampleOptionalFieldsObject)...)
// TODO turn on when https://github.com/TBD54566975/ftl/issues/2651 is fixed
//tests = append(tests, PairedVerbTest("objectMapVerb", map[string]TestObject{"hello": exampleObject})...)
tests = append(tests, PairedVerbTest("objectMapVerb", map[string]TestObject{"hello": exampleObject})...)
tests = append(tests, PairedVerbTest("objectArrayVerb", []TestObject{exampleObject})...)
tests = append(tests, PairedVerbTest("parameterizedObjectVerb", parameterizedObject)...)
tests = append(tests, PairedVerbTest("optionalIntVerb", -3)...)
Expand Down

0 comments on commit c73fa0e

Please sign in to comment.