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

XmlDeclMode is internal in v0.90.1 #219

Closed
FooIbar opened this issue Jun 16, 2024 · 4 comments
Closed

XmlDeclMode is internal in v0.90.1 #219

FooIbar opened this issue Jun 16, 2024 · 4 comments
Labels
indev The issue is fixed/implemented in the dev branch

Comments

@FooIbar
Copy link

FooIbar commented Jun 16, 2024

@XmlUtilInternal
public companion object {

This annotation essentially makes XmlDeclMode internal, see https://github.com/FooIbar/EhViewer/actions/runs/9536087101/job/26282595055

@pdvrieze
Copy link
Owner

This is strange as you only access the enum constants. They should not be part of the companion. I'll undo it in the next release. For this one, opting in is probably the best workaround.

@pdvrieze pdvrieze added the indev The issue is fixed/implemented in the dev branch label Jun 17, 2024
@FooIbar
Copy link
Author

FooIbar commented Jun 17, 2024

This might be a bug of the K2 compiler. It compiles successfully if I change the language version to 1.9.

@pdvrieze
Copy link
Owner

@FooIbar It probably is. The companion object was marked as internal as it is only there as implementation detail (to hold the "from" function, which is only there to support the compatibility configuration). The enum constants are not internal.

@pdvrieze
Copy link
Owner

I've filed a bug on youtrack: https://youtrack.jetbrains.com/issue/KT-69182/K2-regression-optin-on-enum-companion-blocks-enum-constants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
indev The issue is fixed/implemented in the dev branch
Projects
None yet
Development

No branches or pull requests

2 participants