[PATCH] Use builtin bool instead of creating new bool types for ComparisonExpr

2021-08-14 Thread Mark Wielaard
The TypeCheckExpr creates a new TyTy::BoolType for a ComparisonExpr. This new BoolType is unknown to TyTyResolveCompile which causes a crash when trying to compile the inferred new BoolType. The new "bools_eq.rs" testcase uses several bools which show this issue. Resolve this by looking up the buil

[PATCH] parse if expression with unary minus or not expression

2021-08-14 Thread Mark Wielaard
An if conditional expression doesn't need brackets, but that means that it doesn't accept struct expressions. Those are not easy to distinquish from the block that follows. What isn't immediately clear from the grammar is that unary conditions like minus '-' or not '!' also shouldn't accept struct