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

@optics can't handle variance #3057

Closed
shmish111 opened this issue May 23, 2023 · 1 comment
Closed

@optics can't handle variance #3057

shmish111 opened this issue May 23, 2023 · 1 comment

Comments

@shmish111
Copy link

The following code gives the following error

    sealed interface ITest {
        data class Test1(val test: String) : ITest
    }

    interface Extendable<T>
    @optics
    data class TestClass(val details: Extendable<out ITest>) {
        companion object
    }
e: file:///X/Y/Z/build/generated/ksp/jvm/jvmMain/kotlin/MyModule.TestClass__Optics.kt:9:81 Type mismatch: inferred type is MyModule.Extendable<out MyModule.ITest> but MyModule.Extendable<MyModule.ITest> was expected

Looks like it could be an easy fix?

@serras
Copy link
Member

serras commented Jun 2, 2023

Closed by #3057

@serras serras closed this as completed Jun 2, 2023
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

No branches or pull requests

2 participants