[Clang][Module] Transitive importation as in [module.import]/7 is not fully implemented (original) (raw)
Looks like Clang does transitive import as in [module.import]/7 only when the U is "implicitly imported ([module.unit]/8)".
Basically, I expect transitive import to work when dealing with module partitions. Right now, this program doesn't compile:
The primary module interface unit:
export module test; import std; export import :part_interface; import :part_impl;
export void testMIU();
Module impl unit (the non-importable/not-a-partition one)
module test; // OK, implicitly imports the primary module interface unit, // and transitively imports std as expected void testMIU() { std::println("testMIU"); }
A partition:
export module test:part_interface; import std;
export void testPartition();
Another partition:
module test:part_impl; import :part_interface; // should transitively import std!! // import std; // <============ should NOT be needed
void testPartition() { std::println("testPartition"); }