fix(selfhost-sema): bool-family compat in assignment check; drop String<->ptr allowance
This commit is contained in:
+2
-4
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user