Skip to content

Commit

Permalink
fix Format.juvix test
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Sep 5, 2024
1 parent 9adc45d commit 96947e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Juvix/Compiler/Internal/Language.hs
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ instance HasLoc CaseBranch where
getLoc c = getLoc (c ^. caseBranchPattern) <> getLoc (c ^. caseBranchRhs)

instance HasLoc Case where
getLoc c = getLocSpan (c ^. caseBranches)
getLoc c = getLoc (c ^. caseExpression) <> getLocSpan (c ^. caseBranches)

instance HasLoc Expression where
getLoc = \case
Expand Down
3 changes: 2 additions & 1 deletion tests/positive/Format.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,8 @@ module SideIfConditions;
| suc (suc n)
| if 0 < 0 := 3
| else := n
| suc n if 0 < 0 := 3;
| suc n if 0 < 0 := 3
| suc zero := 5;
end;

module MultiIf;
Expand Down

0 comments on commit 96947e8

Please sign in to comment.