Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira authored and lukaszcz committed Sep 26, 2023
1 parent 0cf9931 commit 74ddef2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Juvix/Compiler/Internal/Translation/FromConcrete.hs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ buildLetMutualBlocks ss = nonEmpty' . mapMaybe nameToPreStatement $ scomponents
where
-- TODO buildDependencyInfoLet is repeating too much work when there are big nested lets
depInfo = buildDependencyInfoLet ss

scomponents :: [SCC Internal.Name] = buildSCCs depInfo

statementsByName :: HashMap Internal.Name Internal.PreLetStatement
statementsByName = HashMap.fromList (map mkAssoc (toList ss))
where
Expand Down
4 changes: 4 additions & 0 deletions test/Typecheck/Positive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ tests =
posTest
"Instance import"
$(mkRelDir "InstanceImport")
$(mkRelFile "Main.juvix"),
posTest
"Hole as numeric type"
$(mkRelDir "issue2373")
$(mkRelFile "Main.juvix")
]
<> [ compilationTest t | t <- Compilation.tests
Expand Down
8 changes: 8 additions & 0 deletions tests/positive/issue2373/Main.juvix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module Main;

import Stdlib.Data.Nat open;

main : Nat :=
let
x : _ := 0;
in x;
4 changes: 4 additions & 0 deletions tests/positive/issue2373/juvix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dependencies:
- .juvix-build/stdlib/
name: issue2373
version: 0.0.0

0 comments on commit 74ddef2

Please sign in to comment.