We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using #6235 you can match an expression to a set of patterns like,
if(expr is Pattern1 or Pattern2) if(expr is Pattern1 and Pattern2)
This issue proposes to use same set of operators in the lhs of is operator,
is
if(expr1 or expr2 is Pattern) if(expr1 and expr2 is Pattern)
For example,
a or b is 5 a == 5 || b == 5 a and b is 5 a == 5 && b == 5
We can use both at the same time,
a or b is 1 or 5 (a == 1 || a == 5) || (b == 1 || b == 5) a and b is 1 or 5 (a == 1 || a == 5) && (b == 1 || b == 5) a and b is T a is T && b is T a is T or U a is T || a is U
If the lhs contains an and operator, you can't use variables in your pattern, e.g.
and
if(a and b is T x)
is illegal.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using #6235 you can match an expression to a set of patterns like,
This issue proposes to use same set of operators in the lhs of
is
operator,For example,
We can use both at the same time,
If the lhs contains an
and
operator, you can't use variables in your pattern, e.g.is illegal.
The text was updated successfully, but these errors were encountered: