-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transitively register local modules in ScoperState (#2655)
This PR fixes a TODO in the scoper code. We need to transitively register local modules when checking an import. * Closes #2654
- Loading branch information
1 parent
a110297
commit dc04989
Showing
5 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
tests/positive/ImportNestedLocalModule/ImportNestedLocalModule.juvix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module ImportNestedLocalModule; | ||
|
||
import Stdlib.Prelude open; | ||
import ImportedModule open; | ||
|
||
main : Nat := ImportedModule.A.B.x; |
11 changes: 11 additions & 0 deletions
11
tests/positive/ImportNestedLocalModule/ImportedModule.juvix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module ImportedModule; | ||
|
||
import Stdlib.Prelude open; | ||
|
||
module A; | ||
|
||
module B; | ||
x : Nat := 1; | ||
end; | ||
|
||
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module Package; | ||
|
||
import PackageDescription.V2 open; | ||
|
||
package : Package := defaultPackage {name := "test074"}; |