Another thing I encountered was if you use this ifelse comparison:
alias testbug2 {
set -l %dat C
if (*a* !iswm %dat) && ((*b* iswm %dat) || *C* iswm %dat) echo -s $gettok($ifmatch,1,42) $+ : %dat
}
This will return: b: C
However, if you add the {} brackets, it'll evaluate it correctly and $ifmatch will be set to C