-
Notifications
You must be signed in to change notification settings - Fork 326
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
Extension methods can be exported by name #10274
Conversation
09314ba
to
ae066c3
Compare
ae066c3
to
994b912
Compare
# Conflicts: # engine/runtime-compiler/src/main/scala/org/enso/compiler/pass/analyse/BindingAnalysis.scala # engine/runtime-integration-tests/src/test/scala/org/enso/compiler/test/pass/analyse/BindingAnalysisTest.scala # engine/runtime/src/main/java/org/enso/interpreter/caches/ImportExportCache.java
return CollectionConverters.asJava(mod.getBindingsMap().definedEntities()); | ||
} | ||
|
||
private static Map<String, List<ResolvedName>> getExportedSymbols(Module module) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method looks almost like a useful production code. module.getExportedSymbols
would make same sense too.
Fix some tests in ExtensionMethodResolutionTest
…ed ambiguous if they have the same name
There are four compilation failures IrUtilsTest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look OK. If CI gets green, feel free to proceed with integration.
Co-authored-by: Jaroslav Tulach <jaroslav.tulach@enso.org>
First part of #10258 - extension methods can be exported by name
Pull Request Description
Ultimately, we want to forbid the
from ... export all
syntax. This PR starts by providing a way to explicitly export extension and conversion methods by name.Stdlib code will be modified in upcoming PR.
Important Notes
A single name can refer to multiple extension or conversion methods. Exports are not qualified. For example,
will export both
My_Type.ext_method
andOther_Type.ext_method
.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.