diff --git a/vlib/v/tests/calling_module_functions_with_maps_of_arrays_test.v b/vlib/v/tests/calling_module_functions_with_maps_of_arrays_test.v new file mode 100644 index 0000000000..e515d22092 --- /dev/null +++ b/vlib/v/tests/calling_module_functions_with_maps_of_arrays_test.v @@ -0,0 +1,10 @@ +import json + +fn test_calling_functions_with_map_initializations_containing_arrays() { + result := json.encode(map{ + // NB: []string{} should NOT be treated as []json.string{} + 'users': []string{} + 'groups': []string{} + }) + assert result == '{"users":[],"groups":[]}' +}