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

Always import member without package name #1841

Merged
merged 3 commits into from
Feb 28, 2024
Merged

Always import member without package name #1841

merged 3 commits into from
Feb 28, 2024

Conversation

hfhbd
Copy link
Contributor

@hfhbd hfhbd commented Feb 28, 2024

  • docs/changelog.md has been updated if applicable.

At the moment, it is not possible to import a member without a package. While you should use a package as a good code style, kotlinpoet should not enforce it and should not generate non compiling code due missing imports.

@hfhbd
Copy link
Contributor Author

hfhbd commented Feb 28, 2024

Hm, I want to import a top level function and I used MemberName, which failed due the empty import when compiling. Now I use ClassName and it does work, but the name is strange for top-level functions.

docs/changelog.md Outdated Show resolved Hide resolved
Co-authored-by: Jake Wharton <github@jakewharton.com>
@Egorand
Copy link
Collaborator

Egorand commented Feb 28, 2024

Thanks @hfhbd! Please sign our CLA so we can merge your PR.

@hfhbd
Copy link
Contributor Author

hfhbd commented Feb 28, 2024

Done

@Egorand Egorand merged commit 83a73d2 into square:main Feb 28, 2024
4 checks passed
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

3 participants