Report incompatible types

(Charles Deng) #1

in a “when” clause put a boolean expression as “regex(…).matches && not regex(…).matches”, system will report incompatible types between (regex(…).matches) and (not regex(…).matches):

is it a bug?

(Jochen) #2

&& not is not a valid comparison operator.

Try to be explicit about the comparisons, for example:

regex(...).matches == true && regex(...).matches == false

(Charles Deng) #3

the way you mentioned works. but with more tests, i found it seems although regex(…).matches being boolean value, but it cannot as boolean value directly appears in the logic expression more than 2 times, for example, system will report error with:

regex(...).matches && regex(...).matches && regex(...).matches

but without error with both

   true && not false


 true && not false && not not true

this confused me a lot.

(system) #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.