aboutsummaryrefslogtreecommitdiff
path: root/src/type.cff
diff options
context:
space:
mode:
Diffstat (limited to 'src/type.cff')
-rw-r--r--src/type.cff12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/type.cff b/src/type.cff
index 194ff01..3feb14c 100644
--- a/src/type.cff
+++ b/src/type.cff
@@ -295,14 +295,14 @@ extern fn typeof2(a *const Type, b *const Type) *const Type {
if uac == ubc {
return akonst ? a : b;
}
- if uac == ty_void {
- if bkonst and !akonst { return constifychild(a); }
- return a;
- }
- if ubc == ty_void {
- if akonst and !bkonst { return constifychild(b); }
+ if uac->is(:Void) {
+ if !bkonst and akonst { return constifychild(b); }
return b;
}
+ if ubc->is(:Void) {
+ if !akonst and bkonst { return constifychild(a); }
+ return a;
+ }
}
return #null;
}