From a43b8b5c96f008543dd718c0196e94b4600bc862 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 10 Jun 2020 17:15:35 +0300 Subject: [PATCH] vfmt: add maps_in_fn_args__keep.vv test for 3a369f5 --- vlib/v/fmt/tests/maps_in_fn_args__keep.vv | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 vlib/v/fmt/tests/maps_in_fn_args__keep.vv diff --git a/vlib/v/fmt/tests/maps_in_fn_args__keep.vv b/vlib/v/fmt/tests/maps_in_fn_args__keep.vv new file mode 100644 index 0000000000..59684385e1 --- /dev/null +++ b/vlib/v/fmt/tests/maps_in_fn_args__keep.vv @@ -0,0 +1,15 @@ +import v.ast + +fn abc_xxx(xobj ast.ScopeObject) { +} + +fn abc_map(xmap map[string]ast.ScopeObject) { +} + +fn (t Tree) objects(so map[string]ast.ScopeObject) &C.cJSON { + obj := create_object() + for key, val in so { + to_object(obj, key, t.scope_object(val)) + } + return obj +}