Translation unit #1:
export module A; export import :Foo; export int baz();
Translation unit #2:
export module A:Foo; import :Internals; export int foo() { return 2 * (bar() + 1); }
Translation unit #3:
module A:Internals; int bar();
Translation unit #4:
module A; import :Internals; int bar() { return baz() - 10; } int baz() { return 30; }
Translation unit #1:
module B:Y; // does not implicitly import B int y();
Translation unit #2:
export module B; import :Y; // OK, does not create interface dependency cycle int n = y();
Translation unit #3:
module B:X1; // does not implicitly import B int &a = n; // error: n not visible here
Translation unit #4:
module B:X2; // does not implicitly import B import B; int &b = n; // OK
Translation unit #5:
module B; // implicitly imports B int &c = n; // OK— end example