- fixed: FxUnaryNotBoolean is not necessarily TypeBoolean, it can be altered by a type cast so the asserts had to be adjusted to cover that case.

This commit is contained in:
Christoph Oelckers 2016-11-15 13:52:38 +01:00
parent a63c749f04
commit d4d6b739e0

View file

@ -1847,8 +1847,8 @@ FxExpression *FxUnaryNotBoolean::Resolve(FCompileContext& ctx)
ExpEmit FxUnaryNotBoolean::Emit(VMFunctionBuilder *build)
{
assert(Operand->ValueType == ValueType);
assert(ValueType == TypeBool);
assert(Operand->ValueType == TypeBool);
assert(ValueType == TypeBool || IsInteger()); // this may have been changed by an int cast.
ExpEmit from = Operand->Emit(build);
assert(!from.Konst);
// boolean not is the same as XOR-ing the lowest bit