Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Sep 5, 2024
1 parent 46e2109 commit 0ea967f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/Typecheck/Positive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,11 @@ tests =
posTestAbsDir
"Typecheck orphan file"
(relToProject $(mkRelDir "tests/WithoutPackageFile"))
$(mkRelFile "Good.juvix")
$(mkRelFile "Good.juvix"),
posTest
"Default argument with trait in signature"
$(mkRelDir ".")
$(mkRelFile "issue2994.juvix")
]
<> [ compilationTest t | t <- Compilation.tests
]
12 changes: 12 additions & 0 deletions tests/positive/issue2994.juvix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module issue2994;

type T := t;

type Maybe (a : Type) :=
| nothing
| just a;

trait
type SomeTrait A := mkSomeTrait {baz : A -> T};

bar {{SomeTrait T}} (value : T) {maybeValue : Maybe T := nothing} : T := t;

0 comments on commit 0ea967f

Please sign in to comment.