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

fix for imports from sub-packages #98

Merged
merged 1 commit into from
Feb 7, 2022
Merged

fix for imports from sub-packages #98

merged 1 commit into from
Feb 7, 2022

Conversation

lewisjkl
Copy link
Contributor

@lewisjkl lewisjkl commented Feb 7, 2022

Fixes an issue where imports were being filtered out if they were for a sub-package.

Comment on lines +64 to +70
val packageApplicableDecls = unit.declarations.filter {
case _: TypeAlias | _: Service => true
case _ => false
}

if (packageApplicableDecls.isEmpty) classes
else pack :: classes
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may not be the preferred way to do this, but without something like this an empty package object is created for the import_test package

@lewisjkl lewisjkl merged commit b175146 into main Feb 7, 2022
@lewisjkl lewisjkl deleted the import-fix branch February 7, 2022 23:06
Baccata pushed a commit that referenced this pull request May 10, 2022
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.

2 participants