Skip to content

Commit

Permalink
Add a test showing the problem from #25569
Browse files Browse the repository at this point in the history
---
Signed-off-by: Michael Ferguson <[email protected]>
  • Loading branch information
mppf committed Sep 5, 2024
1 parent 35f8fcc commit 11779bd
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/visibility/submodule-in-file/Recursive.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This (and SubModule) were created as a reproducer for issue #25569

module Recursive {
config param EXTRA_CHECKS = 42;

include public module SubModule;

use this.SubModule;

writeln("in Recursive, EXTRA_CHECKS=", EXTRA_CHECKS);

foo();
}
Empty file.
5 changes: 5 additions & 0 deletions test/visibility/submodule-in-file/Recursive/SubModule.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module SubModule {
import super.EXTRA_CHECKS;

proc foo() { writeln("in SubModule.foo, EXTRA_CHECKS=", EXTRA_CHECKS); }
}
3 changes: 3 additions & 0 deletions test/visibility/submodule-in-file/test-Recursive.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
use Recursive;

proc main() { }
2 changes: 2 additions & 0 deletions test/visibility/submodule-in-file/test-Recursive.good
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
in Recursive, EXTRA_CHECKS=42
in SubModule.foo, EXTRA_CHECKS=42

0 comments on commit 11779bd

Please sign in to comment.