Closed rutefig closed 3 weeks ago
And as oppositte we should not pass if the expression is a signal that is not type bool
The test should pass if the expression is a query on a signal that is of type bool. I am not sure if this works with is_arith is_bool
What do you mean? Is this not supposed to check if the if condition is a boolean expression and throw an error if is not?
is_arith and is_bool does not have access to the symbol table so it does not know the type of a signal.
so
if a
where a
is a signal is only valid if and only if a
is of type bool
. For the rest of cases it is ok to check is_bool, but in the future we should add another rule that checks the types and operators are compatible.
is_arith and is_bool does not have access to the symbol table so it does not know the type of a signal.
so
if a
wherea
is a signal is only valid if and only ifa
is of typebool
. For the rest of cases it is ok to check is_bool, but in the future we should add another rule that checks the types and operators are compatible.
Cool I didn't think about it, but it makes sense, fixed right now. Now it is allowing only logical expressions and bool signals. Thank you for the observation 😄
The test should pass if the expression is a query on a signal that is of type bool. I am not sure if this works with is_arith is_bool