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
PR #6868 introduces an ambiguous symbol import error that is thrown once some import statement imports a symbol that has already been imported by a different import and points to a different entity. This seems too restrictive. We should report this error only if the symbol is used.
The following example unnecessarily results in an ambiguous symbol import error:
Lib1/src/Main.enso:
type S
export project.S
Lib2/src/Main.enso:
type S
export project.S
New_Project/Main.enso:
from Lib1 import all
from Lib2 import all
# Never use symbol S
Currently, this will result in a compiler error about ambiguous symbol S - this first import points to Lib1.S and the second one to Lib2.S. This is too restrictive. We want to defer this error until the symbol S is actually used for the first time.
Currently, both our Standard.Base and Standard.Table have Data directories that can potentially be exported. If they are exported, we will have this ambiguous error.
The solution should probably be to modify AliasAnalysis to include symbols from imports. More specifically, to attach metadata to imported symbols?
The text was updated successfully, but these errors were encountered:
PR #6868 introduces an ambiguous symbol import error that is thrown once some
import
statement imports a symbol that has already been imported by a different import and points to a different entity. This seems too restrictive. We should report this error only if the symbol is used.The following example unnecessarily results in an ambiguous symbol import error:
Lib1/src/Main.enso:
Lib2/src/Main.enso:
New_Project/Main.enso:
Currently, this will result in a compiler error about ambiguous symbol
S
- this first import points toLib1.S
and the second one toLib2.S
. This is too restrictive. We want to defer this error until the symbolS
is actually used for the first time.Currently, both our
Standard.Base
andStandard.Table
haveData
directories that can potentially be exported. If they are exported, we will have this ambiguous error.The solution should probably be to modify
AliasAnalysis
to include symbols from imports. More specifically, to attach metadata to imported symbols?The text was updated successfully, but these errors were encountered: