Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if $(unset-var) in a b c is always true #285

Open
Kojoley opened this issue Apr 23, 2023 · 1 comment
Open

if $(unset-var) in a b c is always true #285

Kojoley opened this issue Apr 23, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Kojoley
Copy link
Contributor

Kojoley commented Apr 23, 2023

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.

@Kojoley Kojoley added the bug Something isn't working label Apr 23, 2023
@Kojoley Kojoley changed the title if $(unset-var) in anything is always true if $(unset-var) in a b c is always true Apr 23, 2023
@grafikrobot
Copy link
Member

grafikrobot commented Apr 7, 2024

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants