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

KSTypeReference.resolve throws IllegalStateException for wildcard types #101

Closed
yigit opened this issue Oct 2, 2020 · 2 comments
Closed
Assignees
Labels
bug Something isn't working P1 major features or blocking bugs
Milestone

Comments

@yigit
Copy link
Collaborator

yigit commented Oct 2, 2020

given the following input:

            import java.util.Set;
            class Foo {
                public void wildcardParam(Set<?> param1) {}
            }

Running the following code throws IllegalStateException when it tries to resolve the type of ?.

            val method = invocation.kspResolver
                .getClassDeclarationByName("Foo")!!
                .getDeclaredFunctions().first {
                it.simpleName.asString() == "wildcardParam"
            }
            method.parameters.first().type?.resolve()?.arguments?.first()?.type?.resolve()
@yigit
Copy link
Collaborator Author

yigit commented Oct 2, 2020

might be related to: #83

@neetopia neetopia self-assigned this Oct 2, 2020
@neetopia neetopia added the bug Something isn't working label Oct 2, 2020
@neetopia neetopia added this to the 2020Q4 milestone Oct 2, 2020
@neetopia
Copy link
Collaborator

neetopia commented Oct 2, 2020

That should be a different issue from your linked one.

@ting-yuan ting-yuan added the P1 major features or blocking bugs label Oct 3, 2020
@neetopia neetopia closed this as completed Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 major features or blocking bugs
Projects
None yet
Development

No branches or pull requests

3 participants