Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error in method declaration with generic extension on companion object #98

Closed
SimonMarquis opened this issue Jun 6, 2023 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@SimonMarquis
Copy link
Owner

If the sealed class has a generic type and requests the extension on the companion object, it will create an invalid method declaration:

public fun com.example.Sealed<*>.Companion.sealedObjectInstances(): kotlin.collections.Set<com.example.Sealed<out kotlin.Any>> = com.example.Sealed<*>::class.sealedObjectInstances()

The expected code would be something like:

public fun com.example.Sealed.Companion.sealedObjectInstances(): kotlin.collections.Set<com.example.Sealed<out kotlin.Any>> = com.example.Sealed::class.sealedObjectInstances()
@SimonMarquis SimonMarquis added the bug Something isn't working label Jun 6, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant