diff --git a/adl/tests/test32/test32a.adl b/adl/tests/test32/test32a.adl new file mode 100644 index 00000000..4984c897 --- /dev/null +++ b/adl/tests/test32/test32a.adl @@ -0,0 +1,9 @@ + +module test32a +{ + import test32b.Y; + + struct X { + Y field; + }; +}; \ No newline at end of file diff --git a/adl/tests/test32/test32b.adl b/adl/tests/test32/test32b.adl new file mode 100644 index 00000000..0de817ad --- /dev/null +++ b/adl/tests/test32/test32b.adl @@ -0,0 +1,9 @@ + +module test32b +{ + import test32a.X; + + struct Y { + X field; + }; +}; \ No newline at end of file diff --git a/adl/tests/testing_table.json b/adl/tests/testing_table.json index d7169e18..025a7afc 100644 --- a/adl/tests/testing_table.json +++ b/adl/tests/testing_table.json @@ -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" ] } ] diff --git a/rust/compiler/src/processing/resolver.rs b/rust/compiler/src/processing/resolver.rs index d878c5a1..ff478403 100644 --- a/rust/compiler/src/processing/resolver.rs +++ b/rust/compiler/src/processing/resolver.rs @@ -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();