chore: ensure pass refers to SpecResult.pass in GuardMsgs (#10539)

This PR adds a `.` in front of `pass` in the `#guard_msgs`
implementation.

Previously, the match arm read `| pass => ...`. Presumably, `pass` was
intended to mean `SpecResult.pass`, but, this isn't in scope, so instead
`pass` here is a catch-all variable. By adding a dot, we ensure we
actually refer to the constant. Note that this was the last case in the
pattern-match, and since all other constructors were correctly
referenced, the only case that went to the fallback was
`SpecResult.pass`, so the code did the right thing. Still, by fixing
this, we prevent a surprise in the event that a new `SpecResult`
constructor is added.
This commit is contained in:
Alex Keizer 2025-09-25 14:50:46 +01:00 committed by GitHub
parent 5fd8c1b94d
commit 188ef680da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -200,7 +200,7 @@ def MessageOrdering.apply (mode : MessageOrdering) (msgs : List String) : List S
match filterFn msg with
| .check => toCheck := toCheck.add msg
| .drop => pure ()
| pass => toPassthrough := toPassthrough.add msg
| .pass => toPassthrough := toPassthrough.add msg
let map ← getFileMap
let reportPos? :=
if reportPositions then