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
Expressions starting from _
are treated as placeholders in match
cases
#1025
Comments
Oh, This sure does look like a bug, but I don't know whether this should be an error, your expected result, or something else. I don't really intend to do anything to improve the state of |
OK, fair enough. I drew an analogy to the partial application or switch's default, where only a standalone underscore has a special meaning. In those cases using I might fix it later. For now, let this issue be a walk-around suggestion. |
Related issue with a plausible use case scenario: This: (_.isPlainObject || _.isArray) value compiles to: true || true; instead of: _.isPlainObject(value) || _.isArray(value); Although I think this feature is a real gotcha and makes sense only in the context of |
Ha, okay, you got me! This should be fixed. |
This looks like an easy one I could tackle, but only from next week. |
I'll hold it for you then. |
Hi, tried to get expected result @pepkin88 needed using below:
Result:
|
Example:
Result:
Expected result:
The example shows, that wrapping the expression in parentheses is enough to bypass this bug.
The text was updated successfully, but these errors were encountered: