distinct keyword for type declarations

This commit is contained in:
gingerBill
2018-02-05 22:46:30 +00:00
parent 2891988d3b
commit 92780e2683
17 changed files with 177 additions and 121 deletions
+3 -3
View File
@@ -1963,10 +1963,10 @@ bool check_type_internal(Checker *c, AstNode *e, Type **type, Type *named_type)
return check_type_internal(c, ht->type, type, named_type);
case_end;
case_ast_node(at, AliasType, e);
error(e, "Invalid use of '#type_alias'");
case_ast_node(dt, DistinctType, e);
error(e, "Invalid use of a distinct type");
// NOTE(bill): Treat it as a HelperType to remove errors
return check_type_internal(c, at->type, type, named_type);
return check_type_internal(c, dt->type, type, named_type);
case_end;
case_ast_node(pt, PolyType, e);