aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index e15d8801..e8ed8c79 100644
--- a/compile.c
+++ b/compile.c
@@ -41,6 +41,9 @@ static bool promote(env_t *env, CORD *code, type_t *actual, type_t *needed)
return true;
}
+ if (actual->tag == NumType && needed->tag == IntType)
+ return false;
+
if (actual->tag == IntType || actual->tag == NumType)
return true;