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

KSP needs a variant of Resolver.overrides that receives the containing ClassDeclaration #792

Closed
yigit opened this issue Jan 12, 2022 · 1 comment · Fixed by #841
Closed
Assignees
Labels
api API changes may be involved
Milestone

Comments

@yigit
Copy link
Collaborator

yigit commented Jan 12, 2022

Input:

             interface Interface {
                fun f1()
            }

            open class Base {
                fun f1() {
                }
            }

            class Subject : Interface, Base() {
                fun f2() {}
            }

The code above compiles successfully as Subject overrides Interface.f1 via Base.f1. Unfortunately, there is no API in KSP to be able to check if Base.f1 overrides Interface.f1 when it is a member of Subject.

@ting-yuan ting-yuan added the api API changes may be involved label Jan 12, 2022
@ting-yuan ting-yuan added this to the 1.0.3 milestone Jan 12, 2022
@yigit
Copy link
Collaborator Author

yigit commented Jan 13, 2022

Not sure if it will affect the implementation but same problem can happen with properties as well.

            interface Interface {
                val prop: String
                fun f1()
            }

            open class Base {
                val prop:String = ""
                fun f1() {
                }
            }

            class Subject : Interface, Base() {
                fun f2() {}
            }
            ```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API changes may be involved
Projects
None yet
3 participants