From 9097e36ea0fd639702af46c9157f10047a194b55 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 20 Oct 2019 14:06:28 -0500 Subject: [PATCH] [] should evaluate to () This is consistent with most bracket tuples. --- src/core/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/compile.c b/src/core/compile.c index 251c84f0..e6b9de64 100644 --- a/src/core/compile.c +++ b/src/core/compile.c @@ -628,7 +628,7 @@ JanetSlot janetc_value(JanetFopts opts, Janet x) { const Janet *tup = janet_unwrap_tuple(x); /* Empty tuple is tuple literal */ if (janet_tuple_length(tup) == 0) { - ret = janetc_cslot(x); + ret = janetc_cslot(janet_wrap_tuple(janet_tuple_n(NULL, 0))); } else if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) { /* [] tuples are not function call */ ret = janetc_tuple(opts, x); } else {