diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-30 14:59:28 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-30 14:59:28 -0500 |
| commit | e38ecde989fe378c49a61d6975784ccfb703cfee (patch) | |
| tree | de045602fdc032854a7c2838706d1aaaccdc9746 /compile.c | |
| parent | 18c1ce7fd18c02abda235781db780c9d5fe73ad4 (diff) | |
Explicitly forbid nested optional types
Diffstat (limited to 'compile.c')
| -rw-r--r-- | compile.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2520,6 +2520,9 @@ CORD compile(env_t *env, ast_t *ast) type_t *key_t = Match(table_type, TableType)->key_type; type_t *value_t = Match(table_type, TableType)->value_type; + if (value_t->tag == OptionalType) + code_err(ast, "Tables whose values are optional (%T) are not currently supported.", value_t); + for (ast_list_t *entry = table->entries; entry; entry = entry->next) { if (entry->ast->tag == Comprehension) goto table_comprehension; |
