google / google/ksp

Add support for annotations in type ascriptions

Open
#2,945 0 comments 0 reactions 0 assignees View on GitHub
core feature request P4
Dominant language
Kotlin
Stars
3.5k
Forks
415
Avg merge
1d 2h
Merged PRs (30d)
53

Description

The following snippet contains an annotation `Anno` but KSP does not pick it up.
```kotlin
@Target(AnnotationTarget.TYPE)
annotation class Anno

val myVal: (@Anno String) -> Unit = { str -> println(str) }
```

`KSTypeReference` is already a subtype of `KSAnnotated` so it shouldn't be that difficult to extend it to type ascriptions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.