From b8a920b235125b099d76fce8b929e10484c30e92 Mon Sep 17 00:00:00 2001 From: dimgigov Date: Tue, 28 Jul 2026 20:55:21 +0300 Subject: [PATCH] fix(selfhost-sema): bool-family compat in assignment check; drop String<->ptr allowance --- src/sema.bux | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/sema.bux b/src/sema.bux index 6a62f21..cbcd71a 100644 --- a/src/sema.bux +++ b/src/sema.bux @@ -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; } }