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

Fix issue with annotated Kotlin function that were not inside a class when using ksp #326

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

rossbacher
Copy link
Collaborator

Make DeepLinkAnnotatedElement.annotatedClass an XMemberContainer as that also wraps the case when the method is not in an annotated class in the ksp case.

Added test for this usecase.

…hat also wraps the case when the method is not in an annotated class in the ksp case.

Added test for this usecase.
import androidx.room.compiler.processing.XMethodElement
import androidx.room.compiler.processing.XTypeElement
import java.net.MalformedURLException

sealed class DeepLinkAnnotatedElement @Throws(MalformedURLException::class) constructor(
val uri: String,
val element: XElement,
val annotatedClass: XTypeElement
val annotatedClass: XMemberContainer
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main fix.

Copy link

@BenSchwab BenSchwab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran into the same thing with scabbard

@rossbacher rossbacher merged commit 0b7ffc3 into master Jun 30, 2021
@rossbacher rossbacher deleted the fixAnnotatedMethodThatAreInNoClass branch June 30, 2021 22:03
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

2 participants