You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix resolution for exported symbols from relatively imported modules
- Schedule unresolved relative using/import (., .., …) for a late retry:
push the import expr and its enclosing module into state.resolveonly.
- In ResolveOnly, run resolve_import(x, state) before resolve_ref/traverse.
- Resolve module identifiers from module Scope:
resolve_ref_from_module(::Scope) now binds the module’s own name.
- Bind names for bare import (no selectors):
_mark_import_arg adds the imported module name to scope.names.
- Initialize scope.modules when needed in add_to_imported_modules.
- Add LintCodes.RelativeImportTooManyDots and surface a diagnostic when
leading dots exceed available module nesting.
Tests:
- Forward relative using/import resolves across sibling/grandparent modules.
- Bare import binds module name (Another.f() resolves).
- “Too many dots” triggers RelativeImportTooManyDots.
0 commit comments