-
Notifications
You must be signed in to change notification settings - Fork 135
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
with
is not tested with Junction
#852
Comments
Actually, it's incorrect behavior. It is absolutely unambiguously stated that junctions only collapse in a boolean context. |
So you're saying we would need to change the behaviour of Raku since 2016? I think at this point, it'd be better to change the documentation. As apparently this hasn't been an issue for the past 8 years. |
At the time, @TimToady was still very much involved in development, so I wouldn't necessarily take the lack of discussion as a sign this was done singlehandedly by @zoffixznet, but rather as a sign that nobody thought it strange enough to warrant a discussion about it. |
If it gets documented then there must be a remark about the behavior to be changed in the future. It would be great if the change can be done for 6.e only, but our current model of versioning makes it too difficult.
Unfortunately, this wouldn't be the first time when I stumble across some code where Zoffix was reacting without giving deeper insight into the matter. Once it was about fixing an erroneous test in Roast. Coincidentally, it was something about junctions too. :) |
But why would it need to be changed? What's the use of a Could you give an example of when this would make a difference? |
No, I don't have such an example in my mind. But then why As a side note, there are ways to "introspect" individual eigenstates. Say, the most primitive one with |
To me, it looks like a bug in the test. The description of the subtest in 6b84580ecc states the test is meant to test the fact that roast/packages/Test-Helpers/lib/Test/Util.rakumod Lines 26 to 44 in 8640e3a
Don't remember much about how/what it should be like, but to add to the above example from vrurg, there's also potential for different multies to be called:
|
The current behaviour was changed/implemented without further discussion because of rt.perl.org#130099. This made the following DWIM:
However, it was not tested in S04-statements/with.t and I believe it should have.
It futher created the following surprise:
If this issue is closed with an addition to with.t, please file an issue in the docs repo to be clear that calling
.defined
and.Bool
onJunction
does not create a new Junction object holding the result-values (in contrast to all other methods and subs/operators).The text was updated successfully, but these errors were encountered: