diff options
Diffstat (limited to 'typecheck.c')
| -rw-r--r-- | typecheck.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/typecheck.c b/typecheck.c index ad1062d1..30ac197d 100644 --- a/typecheck.c +++ b/typecheck.c @@ -457,6 +457,12 @@ type_t *get_type(env_t *env, ast_t *ast) code_err(ast, "I can't compare these two different types: %T vs %T", lhs_t, rhs_t); return Type(BoolType); } + case BINOP_POWER: { + type_t *result = get_math_type(env, ast, lhs_t, rhs_t); + if (result->tag == NumType) + return result; + return Type(NumType, .bits=64); + } default: { return get_math_type(env, ast, lhs_t, rhs_t); } |
