Skip to content
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

Introduce glob imports in import statements #1566

Merged
merged 6 commits into from
May 31, 2024

Conversation

sezna
Copy link
Contributor

@sezna sezna commented May 23, 2024

branched off of #1469

This PR mainly introduces glob imports in import statements, e.g.:

import Foo.*;
import Foo.Bar.* as Baz;

et cetera.

Glob imports work similarly to other languages: Foo.* brings in everything from Foo, while Foo.* as Bar brings in all of Foo, but aliased under a namespace Bar. For example, if function F() : Unit {} exists in Foo, then after importing via Foo.* as Bar, it would be available as Bar.F().

Other incidental changes include:

  • Improving the Display impl for ImportOrExportItem, for easier-to-read tests

@sezna sezna changed the title Allow glob imports in import statements Introduce glob imports in import statements May 23, 2024
@sezna sezna self-assigned this May 24, 2024
@sezna sezna marked this pull request as ready for review May 24, 2024 01:23
Base automatically changed from alex/import-statements to alex/export-statements May 28, 2024 18:27
@sezna sezna merged commit 270da16 into alex/export-statements May 31, 2024
1 check passed
@sezna sezna deleted the alex/glob-imports branch May 31, 2024 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants