diff --git a/test/Typecheck/Positive.hs b/test/Typecheck/Positive.hs index d61d479ee0..55928a82c8 100644 --- a/test/Typecheck/Positive.hs +++ b/test/Typecheck/Positive.hs @@ -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 ] diff --git a/tests/positive/issue2994.juvix b/tests/positive/issue2994.juvix new file mode 100644 index 0000000000..2867242c3e --- /dev/null +++ b/tests/positive/issue2994.juvix @@ -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;