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 {
|
} else if initType != annotKind {
|
||||||
let numericOk: bool = Sema_IsStrictNumeric(initType) && Sema_IsStrictNumeric(annotKind);
|
let numericOk: bool = Sema_IsStrictNumeric(initType) && Sema_IsStrictNumeric(annotKind);
|
||||||
let initIsPtr: bool = initType == tyPointer || initType == tyStr;
|
let boolOk: bool = Sema_IsBool(initType) && Sema_IsBool(annotKind);
|
||||||
let annotIsPtr: bool = annotKind == tyPointer || annotKind == tyStr;
|
if !numericOk && !boolOk {
|
||||||
let ptrOk: bool = initIsPtr && annotIsPtr;
|
|
||||||
if !numericOk && !ptrOk {
|
|
||||||
mismatch = true;
|
mismatch = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user