Imported modules skip already imported modules in the chain #17
Labels
bug
Something isn't working
help wanted
Extra attention is needed
LLVM-specific
Issues that are related to LLVM or the Code Generation step
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).
The text was updated successfully, but these errors were encountered: