aboutsummaryrefslogtreecommitdiff
path: root/src/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compile.c')
-rw-r--r--src/compile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compile.c b/src/compile.c
index bf6f0b7f..6b465b20 100644
--- a/src/compile.c
+++ b/src/compile.c
@@ -1851,6 +1851,10 @@ CORD compile_to_type(env_t *env, ast_t *ast, type_t *t)
auto set = Match(ast, Set);
if (!set->item_type && !set->items)
return compile(env, ast);
+ } else if (t->tag == SetType && ast->tag == Table) {
+ auto table = Match(ast, Table);
+ if (!table->key_type && !table->value_type && !table->default_value && !table->fallback && !table->entries)
+ return compile(env, ast);
}
type_t *actual = get_type(env, ast);