Closed gergelyattilakiss closed 5 days ago
Can you try with () around the expression? The error message looks like one side of the expression is BitVector, the other is Bool. It may also be the case that we need &
and not &&
.
Both & and && should work, the only difference is that the latter short circuits: does not evaluate if the LHS is already false.
Wrapping in ()
does not solve the issue.
Interestingly, (... & ...)
and true & true
fails at parser level because it does not fit into Command
structure's condition
field.
Connecting with &&
passes the parser tests so it is an expression, and sometimes it also passes the command tests too.
const && const
and const && condition
are passing.
condition && condition
and condition && const
are not.
Why is there an equal sign here? This should be $bitvector .| ($mask)
Note the ()
that was just a typo I haven't noticed. correcting the missing ()
too.
The issue is with merging boolean and vector in a boolean context like
On the other hand it is very interesting that if we start with the boolean there is no error in it.
The soultion should be something like:
The right one is ||
the use of .|
and .&
does something weird... :smile:
this is solved at https://github.com/codedthinking/Kezdi.jl/commit/e281d69a284088bbeb16a8a1895be2066a224dac
@korenmiklos I hope this solution will not hurt when you refactor. I just changed how the &&
and ||
is parsed.
Refactor did not change the current test results, although I want to write some more tests to see that with proper values we get what we want
This goes well with the refactor added some more test cases. they pass