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
This produces the repeated patterns error, but both highlights (error and hint) are on b'a', which is not the repeated. The repeated pattern is b'b'.
Bad error message:
Error: Duplicated match pattern
────┬─ boog.jakt:4:10
26 │ match 1u8 {
27 │ b'a' | b'b' | b'b' => {}
│ ──┬
│ ╰─ Duplicated match pattern
28 │ else => {}
────┴─
Hint: Original pattern here
────┬─ boog.jakt:4:10
26 │ match 1u8 {
27 │ b'a' | b'b' | b'b' => {}
│ ──┬
│ ╰─ Original pattern here
28 │ else => {}
────┴─
Expected error message:
Error: Duplicated match pattern
───┬─ boog.jakt:4:23 | <- notice how the column number changes here. This should be the only thing to test, really.
3 │ match 1u8 {
4 │ b'a' | b'b' | b'b' => {}
│ ──┬ | notice how the offset in of the highlight is different, since it was moved
│ ╰─ Duplicated match pattern |
5 │ }
───┴─
Hint: Original pattern here
───┬─ boog.jakt:4:10
3 │ match 1u8 {
4 │ b'a' | b'b' | b'b' => {}
│ ──┬ | I've also had to move the highlight here
│ ╰─ Original pattern here
5 │ }
───┴─
Note that Jakttest currently doesn't support error message locations, only searching through their titles, so automating this test is not going to be pretty (if it is done) for the moment.
The text was updated successfully, but these errors were encountered:
cg-jl
changed the title
Inline repeated patterns don't have the correct column highlight
Repeated patterns in the same line don't have the correct column highlight
Jun 12, 2024
The column highlight for the "repeated patterns" error points incorrectly to the first pattern in the line, which
causes confusion:
This produces the repeated patterns error, but both highlights (error and hint) are on
b'a'
, which is not the repeated. The repeated pattern isb'b'
.Bad error message:
Expected error message:
Note that Jakttest currently doesn't support error message locations, only searching through their titles, so automating this test is not going to be pretty (if it is done) for the moment.
The text was updated successfully, but these errors were encountered: