stricter boolean check

This commit is contained in:
Jarred Sumner
2022-04-09 20:06:58 -07:00
parent fb82e2bf86
commit 696bb3b026

View File

@@ -3388,7 +3388,7 @@ pub const Expr = struct {
},
// "!!!a" => "!a"
.e_unary => |un| {
if (un.op == Op.Code.un_not and isBoolean(un.value)) {
if (un.op == Op.Code.un_not and knownPrimitive(un.value) == .boolean) {
return un.value;
}
},