b2
b2 copied to clipboard
`if $(unset-var) in a b c` is always true
local a ;
if $(a) in q w e {
ECHO "wtf" ;
}
prints
wtf
Is this intended to work this way? Maybe it has some good uses, but I can't think of one. And $(a:E=) as a workaround could hit you in the back too when right hand side is variable.
I just ran into a situation where we rely on this functionality: https://github.com/bfgroup/b2/blob/main/src/build/targets.jam#L1259
And thinking about it, it makes sense. As the in operator is equivalent to "A is a subset of B".