test: two builds of one module are refused before anything compiles
The fixture is P -> M and P -> A -> M, where M's own flag --wide changes a struct it exports. Loaded with --wide --split, P gives M its args without --wide while A passes them on whole: Build(P) has to fail, name the module and both paths, and leave no bin/ anywhere. Loaded with --wide alone, both paths give M the same list, there is one M, and the build has to go through. Before the fix the first case built cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d5b80fcf7e
commit
3d2023cb5c
8 changed files with 188 additions and 0 deletions
12
tests/DuplicateModule/fixture/m/interfaces/M.cppm
Normal file
12
tests/DuplicateModule/fixture/m/interfaces/M.cppm
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
export module M;
|
||||
import std;
|
||||
// --wide gives S more members, so the two builds of M the test asks for
|
||||
// differ in what they declare.
|
||||
#ifdef WIDE
|
||||
export struct S { std::int32_t a; std::int32_t b; std::int64_t pad[4]; };
|
||||
#else
|
||||
export struct S { std::int32_t a; std::int32_t b; };
|
||||
#endif
|
||||
export std::int32_t Size() {
|
||||
return static_cast<std::int32_t>(sizeof(S));
|
||||
}
|
||||
Loading…
Reference in a new issue