Idea detail
import_tokenisation
reqlan rq/language/imports.rq:167
block
Summary
if an import is given an alias, then the base name is still available as a variable name and should not cause a conflict.
Only the alias binds in the importing file; the imported idea's base name may be reused for a local idea.
e. g.
The same rule applies to qualified imports with `as`.
Unaliased imports still bind the idea name and conflict with a local idea of that name.
Related: sensible_alias_support.
Navigation
Attributes
| Key | Value |
|---|---|
| implementation | reqlan.langium, reqlan-import-bindings.ts, reqlan-validator.ts, reqlan-scope.ts |
| tests | validating.test.ts:allows local idea when import uses an alias, validating.test.ts:allows local idea when qualified import uses an alias, validating.test.ts:reports duplicate when local idea shares unaliased import binding, linking.test.ts:import idea reference resolves to imported file when local idea shares name |
Ancestor context
No ancestor chain recorded.
Outbound references
Inbound references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | sensible_alias_support | reqlan rq/extension/language/syntax/features-syntax.rq | import_tokenisation |
| references | reference_resolution_order | reqlan rq/language/syntax.rq | import_tokenisation |
Unresolved references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| None | |||
Local graph
Initialising graph…