Skip to content

Commit

Permalink
fix circular ref testing
Browse files Browse the repository at this point in the history
  • Loading branch information
millergarym committed Apr 17, 2023
1 parent 5c940b7 commit f4465af
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
9 changes: 9 additions & 0 deletions adl/tests/test32/test32a.adl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

module test32a
{
import test32b.Y;

struct X {
Y field;
};
};
9 changes: 9 additions & 0 deletions adl/tests/test32/test32b.adl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

module test32b
{
import test32a.X;

struct Y {
X field;
};
};
1 change: 1 addition & 0 deletions adl/tests/testing_table.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,6 @@
"title": "protoapp",
"lib_paths": [ "test31/lib" ]
},
{ "module_root": "test32", "modules": ["test32a", "test32b"], "fail": true, "title": "Circular module reference"},
{ "module_root": "demo1", "modules": ["picture" ] }
]
2 changes: 1 addition & 1 deletion rust/compiler/src/processing/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl Resolver {

let module_refs = find_module_refs(&module0);
for m in &module_refs {
self.add_module(m)?;
self.add_module_impl(in_progress, m)?;
}

let type_params = HashSet::new();
Expand Down

0 comments on commit f4465af

Please sign in to comment.