summaryrefslogtreecommitdiff
path: root/parser/interpreter_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'parser/interpreter_test.go')
-rw-r--r--parser/interpreter_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/parser/interpreter_test.go b/parser/interpreter_test.go
index a459359..a6ad246 100644
--- a/parser/interpreter_test.go
+++ b/parser/interpreter_test.go
@@ -255,3 +255,11 @@ func TestImport(t *testing.T) {
{src: `import . "fmt"; Println(4)`, res: "<nil>"},
})
}
+
+func TestComposite(t *testing.T) {
+ run(t, []etest{
+ {src: "type T struct{}; t := T{}; t", res: "{}"},
+ {src: "t := struct{}{}; t", res: "{}"},
+ // {src: "type T struct{N int}; t := T{2}; t", res: "{2}"},
+ })
+}