A named #import c unit declared inside an aliased module sits two namespace levels deep in the merged tree; the one-level walk (the extractLibraries/0130 pattern in c_import form) never collected it, so the unit silently never compiled and its symbols resolved from whatever process image carried the same names — surfaced by C4's sqlite migration, where only the version pin could tell the OS copy from the vendored one.
12 lines
447 B
Plaintext
12 lines
447 B
Plaintext
// A named `#import c` unit declared INSIDE an aliased module (so the
|
|
// unit's namespace nests two deep in the merged tree) still compiles
|
|
// and links — collectCImportSources recurses through namespaces, the
|
|
// same way #library collection does (issue 0130's pattern).
|
|
#import "modules/std.sx";
|
|
m :: #import "1623-cimport-unit-in-aliased-module/mod.sx";
|
|
|
|
main :: () -> i32 {
|
|
print("nested unit answer = {}\n", m.answer_via_mod());
|
|
0
|
|
}
|