Skip to content

Imported modules skip already imported modules in the chain #17

@alinalihassan

Description

@alinalihassan

Imported modules will skip an import if it's already been added. This makes sense at first, but consider this (common) situation:
We have the main module, in file main.les. Then we have the base module that always gets imported implicitly. And then we want to import another module. Whatever the module is, it won't be able to import base.les again because we already imported it, and it can't use it since we didn't make a way to get the scope from the importer to the imported.

It's not an easy bug to fix, but there might be a couple of ways to fix it. One would be to keep a table of scopes from modules, and import that scope locally when we try an import a file that already exists (but make sure we don't double import).

Metadata

Metadata

Assignees

No one assigned

    Labels

    LLVM-specificIssues that are related to LLVM or the Code Generation stepbugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions