Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Nov 4, 2024
1 parent 71161ff commit 3b28dbd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/Compilation/Positive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -485,5 +485,10 @@ tests =
"Test082: Pattern matching with side conditions"
$(mkRelDir ".")
$(mkRelFile "test082.juvix")
$(mkRelFile "out/test082.out")
$(mkRelFile "out/test082.out"),
posTest
"Test083: Record update"
$(mkRelDir ".")
$(mkRelFile "test083.juvix")
$(mkRelFile "out/test083.out")
]
1 change: 1 addition & 0 deletions tests/Compilation/positive/out/test083.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
13
13 changes: 13 additions & 0 deletions tests/Compilation/positive/test083.juvix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- Record update
module test083;

import Stdlib.Prelude open;

type R := mkR@{
x : Nat;
y : Nat;
};

f (r : R) : R := let x := 7 in r@R{x := R.x r + x; y := x};

main : Nat := case f (mkR 1 2) of mkR x y := x + 5;

0 comments on commit 3b28dbd

Please sign in to comment.