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

No "kotlin.ExtensionFunctionType" annotation on functional types with receivers #985

Closed
popovanton0 opened this issue May 12, 2022 · 0 comments · Fixed by #1101
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@popovanton0
Copy link

popovanton0 commented May 12, 2022

When you have a KSType that represents a functional type with a receiver (e.g. String.() -> Unit), and you are trying to get the list of all annotations of the type, there is no @kotlin.ExtensionFunctionType. But, functionalType.toString() call returns this:

"[@kotlin.ExtensionFunctionType] Function1<String, Unit>"

In the debugger, I see this:

Somehow, this annotation is omitted by ksp.

However, without it seems impossible to determine, whether any functional type has a receiver or not.
Maybe there is another way?

I created a branch in my repo that reproduces this behaviour. To reproduce, run this unit test. Input to the test is here. Code of the processor is here.

@neetopia neetopia added the bug Something isn't working label May 12, 2022
@neetopia neetopia self-assigned this May 13, 2022
@neetopia neetopia added this to the 1.0.7 milestone Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants