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

Can't get property with type contained as an inner class from visitPropertyDeclaration #1022

Closed
WindSekirun opened this issue Jun 15, 2022 · 1 comment

Comments

@WindSekirun
Copy link

WindSekirun commented Jun 15, 2022

Description

  • KSP Version: 1.7.0-1.0.6
  • Kotlin Version: 1.7.0

After bumping 1.7.0-1.0.6, I can't get type property with visitPropertyDeclaration with following code. (1.6.21-1.0.5 working normally)

public class SampleJava {
    @SampleAnnotation
    public String a;

    @SampleAnnotation
    public int b;

    public enum Type {
        Test
    }

    @SampleAnnotation
    public Type type;
}

As a temporary solution, following code can obtain missing property type.

classDeclaration.getAllProperties()
    .filter { it.isAnnotationPresent(SampleAnnotation::class) }

Steps to Reproduce

Actual Result

screenshot

Expected Result

  • Should obtain type parameter from visitPropertyDeclaration
@WindSekirun
Copy link
Author

It seems issue resolve with #1034

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

1 participant