Problem
Calls to a missing member on an imported Home module namespace fall through inferCallExpression and synthesize void. A typed use then reports a downstream type mismatch instead of the missing export.
Current home-os evidence under #787:
scheduler.get_current_pid()resolves tovoid, while the module exportsscheduler_get_current_pid.foundation.read_cr2()resolves tovoid, but the module has no such export.syscall.syscall_dispatch(...)resolves tovoid, while the module exportssyscall_handler.
This obscures the source defect and creates cascaded errors.
Scope
- Track which struct-shaped values are imported module namespaces.
- Emit one direct missing-export diagnostic for absent namespace fields/methods.
- Return
Unknownafter the primary diagnostic so typed assignments and returns do not add false type-mismatch cascades. - Preserve argument traversal for diagnostics and initialization tracking.
Acceptance criteria
- A call to an exported namespace function preserves its declared return type.
- A call to a private or absent namespace member emits a direct missing-export diagnostic.
- A typed use of that call does not also report a
voidmismatch. - Existing type-checker tests and the home-os audit are rerun under the memory guard.