fix(selfhost-sema): bool-family compat in assignment check; drop String<->ptr allowance

This commit is contained in:
2026-07-28 20:55:21 +03:00
parent f0890e13f8
commit b8a920b235
+2 -4
View File
@@ -1508,10 +1508,8 @@ module Sema {
}
} else if initType != annotKind {
let numericOk: bool = Sema_IsStrictNumeric(initType) && Sema_IsStrictNumeric(annotKind);
let initIsPtr: bool = initType == tyPointer || initType == tyStr;
let annotIsPtr: bool = annotKind == tyPointer || annotKind == tyStr;
let ptrOk: bool = initIsPtr && annotIsPtr;
if !numericOk && !ptrOk {
let boolOk: bool = Sema_IsBool(initType) && Sema_IsBool(annotKind);
if !numericOk && !boolOk {
mismatch = true;
}
}