aboutsummaryrefslogtreecommitdiff
path: root/src/analyzer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analyzer.c')
-rw-r--r--src/analyzer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/analyzer.c b/src/analyzer.c
index 4d41a33..dc22190 100644
--- a/src/analyzer.c
+++ b/src/analyzer.c
@@ -292,6 +292,7 @@ typecompat(struct type lhs, struct type rhs)
return true;
/* Two typed numeric types are only compatible if they have the same size
- and sign */
- return lhs.issigned == rhs.issigned && lhs.size == rhs.size;
+ and sign and are either both integral or both floats */
+ return lhs.issigned == rhs.issigned && lhs.isfloat == rhs.isfloat
+ && lhs.size == rhs.size;
}