*WIP* error sets - an inferred error set can end up being the global one

This commit is contained in:
Andrew Kelley
2018-02-03 14:06:37 -05:00
parent abf5ae6897
commit ef5e7bb469
6 changed files with 346 additions and 311 deletions

View File

@@ -5216,6 +5216,7 @@ static void define_builtin_types(CodeGen *g) {
{
TypeTableEntry *entry = new_type_table_entry(TypeTableEntryIdErrorSet);
buf_init_from_str(&entry->name, "error");
entry->data.error_set.err_count = UINT32_MAX;
// TODO allow overriding this type and keep track of max value and emit an
// error if there are too many errors declared