aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-13 02:09:18 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-13 02:09:18 -0400
commit158a1c6ad2d9b3f2a598e6d1d8debcc824ad73d0 (patch)
treec7f05fc95b47e51bd9aa200860ebfdecee91fe57 /compile.c
parenta32d90fcd737a27fd2d098a8d81b5965917439cf (diff)
More fixes
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index af7211ad..2377ec25 100644
--- a/compile.c
+++ b/compile.c
@@ -1487,8 +1487,8 @@ CORD compile(env_t *env, ast_t *ast)
switch (binop->op) {
case BINOP_POWER: {
- if (operand_t->tag != NumType && operand_t->tag != IntType)
- code_err(ast, "Exponentiation is only supported for numeric types");
+ if (operand_t->tag != NumType)
+ code_err(ast, "Exponentiation is only supported for Num types");
if (operand_t->tag == NumType && Match(operand_t, NumType)->bits == 32)
return CORD_all("powf(", lhs, ", ", rhs, ")");
else