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
The f3 method should probably not show up because the import is hiding it. But the f4 method is imported by name so it should be available. This is analogous to how we are doing exporting of extension methods - they are exported by the method name (#10274) (even if that may match multiple extension methods for various types). Imports should probably also be consistent with that.
The text was updated successfully, but these errors were encountered:
I've encountered this problem when I was trying to understand our imports logic when working on the typechecker. I was surprised that ImportExportScope has only typesOnlyNames but it does not have anything to represent the hiding concept.
This issue is partially blocking the typechecker work (#9812) because I need to replicate the logic for creating the runtime ModuleScope but statically. Given that this bug means the logic will change, it is a bit hard to figure out how to replicate the not-yet-implemented logic. I will probably try to approximate it and then will refactor once this bug is fixed.
Project containing repro: testproject1.zip
The project above defines a type
Typ
defined inside of moduleTyp
, and extension methods defined in following modules:F1
we haveTyp.f1 self = 1
F23
we have analogousf2
andf3
F45
we havef4
andf4
.Then we do the following set of imports:
Actual behaviour
This yields the following output:
Expected behaviour
Instead, we would expect it to be:
The
f3
method should probably not show up because the import ishiding
it. But thef4
method is imported by name so it should be available. This is analogous to how we are doing exporting of extension methods - they are exported by the method name (#10274) (even if that may match multiple extension methods for various types). Imports should probably also be consistent with that.The text was updated successfully, but these errors were encountered: