diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-04-23 13:12:49 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-04-23 13:12:49 -0400 |
| commit | 63083252522d22f5ed9d14912696fab1c8347b65 (patch) | |
| tree | 36dd280608719c0d77539631f585cde25a6ea0dd /typecheck.c | |
| parent | 005427744daa8d70abeffde9a05831b4bdb0682f (diff) | |
Add constructor/casting for ints and nums
Diffstat (limited to 'typecheck.c')
| -rw-r--r-- | typecheck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/typecheck.c b/typecheck.c index 229a8cd2..4fcbcf20 100644 --- a/typecheck.c +++ b/typecheck.c @@ -509,7 +509,7 @@ type_t *get_type(env_t *env, ast_t *ast) if (fn_type_t->tag == TypeInfoType) { type_t *t = Match(fn_type_t, TypeInfoType)->type; - if (t->tag == StructType) + if (t->tag == StructType || t->tag == IntType || t->tag == NumType) return t; // Constructor code_err(call->fn, "This is not a type that has a constructor"); } |
