Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module names shouldn't shadow if they refer to the same module #1744

Open
jpolitz opened this issue May 13, 2024 · 0 comments
Open

Module names shouldn't shadow if they refer to the same module #1744

jpolitz opened this issue May 13, 2024 · 0 comments

Comments

@jpolitz
Copy link
Member

jpolitz commented May 13, 2024

This program reports a shadowing error:

import lists as lists
import lists as lists

It shouldn't. We have similar logic for cases like this (which is not a shadowing errror):

use context starter2024 # imports e.g. map, filter
import lists as lists
include from lists: map, filter end

We should make the first program not be a shadowing error, either (note it's the simple case – the more complex cases involve transitive includes, include from X: module Y end and so on). The function make-import-atom-for has the “right” logic, though finding the underlying URL of the referred module may take some more work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant