summaryrefslogtreecommitdiff
path: root/interp
diff options
context:
space:
mode:
Diffstat (limited to 'interp')
-rw-r--r--interp/interpreter_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/interp/interpreter_test.go b/interp/interpreter_test.go
index 42cb7e2..4f5690d 100644
--- a/interp/interpreter_test.go
+++ b/interp/interpreter_test.go
@@ -260,5 +260,7 @@ func TestComposite(t *testing.T) {
{src: "t := struct{}{}; t", res: "{}"},
{src: `type T struct {}; var t T; t = T{}; t`, res: "{}"},
{src: `type T struct{N int; S string}; var t T; t = T{2, "foo"}; t`, res: `{2 foo}`},
+ {src: `type T struct{N int; S string}; t := T{2, "foo"}; t`, res: `{2 foo}`},
+ {src: `type T struct{N int; S string}; t := T{S: "foo"}; t`, res: `{0 foo}`},
})
}