<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/84002>84002</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Clang][Module] Transitive importation as in [module.import]/7 is not fully implemented
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            c++20,
            clang:modules
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          poyaoc97
      </td>
    </tr>
</table>

<pre>
    Looks like Clang does transitive import as in [[module.import]/7](https://timsong-cpp.github.io/cppwp/n4868/module.import#7.sentence-2) only when the `U` is ["implicitly imported ([module.unit]/8)"](https://timsong-cpp.github.io/cppwp/n4868/module.unit#8).

Basically, I expect transitive import to work when dealing with module partitions. Right now, [this program](https://godbolt.org/z/dnbqooKPa) doesn't compile:

The primary module interface unit:
```c++
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)
```c++
module test;
// OK, implicitly imports the primary module interface unit,
// and transitively imports std as expected
void testMIU() { std::println("testMIU"); }
```
A partition:
```c++
export module test:part_interface;
import std;

export void testPartition();
```
Another partition:
```c++
module test:part_impl;
import :part_interface; // should transitively import std!!
// import std; // <============ should NOT be needed

void testPartition() {
  std::println("testPartition");

```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVVuP4jYU_jUnL0egcEICPOSBiyKttttdVbPPlZMcEnccO43NsPTXV04CAyxiqmola6Lx5fP5LvgIa2WlmVOINxDvAnFwtenS1pyEKVaLIDflKf3NmFeLSr4ybpXQFZaGLbpOaCudfGOUTWs6h8Ki1NgjbRpTHhRPhxWId0DZov8sa-daC9EaKAPKnGys0dWkaNtpJV19yKfSAGVF2x5boEzPl8kSKLvFo2gxtawd64InBLRCo9UJjzVrdDUjJOF3SEKUti-HSDatkoV06jQWyyUCLd8LPWg5lrkEWgHRLyi2x6TIA04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