google / google/ksp

KSP2 asStarProjectedType return KSTypeArgument without type

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

Description

This is a behaviour change when switching to KSP2.
Tested in version `2.1.0-1.0.29` with the `ksp.useKSP2` gradle property.

```kotlin
class Test {
}
```

In KSP processor:
```kotlin
val type = declaration.asStarProjectedType()
println(type.arguments.single())
```
Before KSP2 this prints `STAR Any`
With KSP2 this prints `STAR null`

How do I get the a type from a KSClassDeclaration which with its type arguments as upper bounds in KSP2?

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.