You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you look at PR 29213, you'll notice that after the first commit, we had three very similar test cases func sr11212_content_generic_pattern_untupledN (N = 1, 2, 3) but only the third one triggered an error. Based on the fix in the second commit (implicitly tupling the pattern), one would think that the first two should trigger errors too. But they weren't triggering errors before! This means that there must be some bug in the pattern engine, and the two bugs cancelled each other out.
For the sake of keeping this bug report self-contained, I should point out the main thing:
enumBox<T> {
casebox(T)
}
funcf(b: Box<(Int, Int)>) -> (Int, Int) {
switchb {
caselet .box(x, y): return (x, y)
// Before PR, pattern was treated as AssociatedValues(x, y) // !!! should've been an error but it wasn't!// After PR, pattern is treated as Tuple(x, y) // ok
}
}
My hunch is that trying to find a test case after PR 29213 might be very tricky. It might help to comment out the fix in PR 29213 while trying to find a test case (at the risk of rediscovering something already fixed by PR 29213).
We need to be careful though, in case we break some buggy behavior someone is relying on.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 7407a6de1c05c91acdf78849acf2e3b8
Issue Description:
If you look at PR 29213, you'll notice that after the first commit, we had three very similar test cases
func sr11212_content_generic_pattern_untupledN
(N = 1, 2, 3) but only the third one triggered an error. Based on the fix in the second commit (implicitly tupling the pattern), one would think that the first two should trigger errors too. But they weren't triggering errors before! This means that there must be some bug in the pattern engine, and the two bugs cancelled each other out.For the sake of keeping this bug report self-contained, I should point out the main thing:
My hunch is that trying to find a test case after PR 29213 might be very tricky. It might help to comment out the fix in PR 29213 while trying to find a test case (at the risk of rediscovering something already fixed by PR 29213).
We need to be careful though, in case we break some buggy behavior someone is relying on.
The text was updated successfully, but these errors were encountered: