google / ksp

Kotlin Symbol Processing API
https://github.com/google/ksp
Apache License 2.0
2.72k stars 254 forks source link

Got IllegalStateException when calling replace() on error types #1960

Closed kuanyingchou closed 2 weeks ago

kuanyingchou commented 3 weeks ago

Got exception java.lang.IllegalStateException: Unexpected type org.jetbrains.kotlin.analysis.api.fir.KaFirSession@14a98c7a when calling replace() on error types when the origin is Java or Kotlin.

Repro: https://github.com/kuanyingchou/ksp/commit/2e3ff33debffd276acbf7afac95de469b23360dc