This is a KSP1 issue. When a Java field is of a generic Kotlin type with declaration site variance, its wildcard is lost after asMemberOf call. For example, the type of the field A<? extends Number> a; becomes (A<(Number..Number?)>..A<(Number..Number?)>?) instead of (A<out (Number..Number?)>..A<out (Number..Number?)>?), where A is defined as interface A<out T>.
This is a KSP1 issue. When a Java field is of a generic Kotlin type with declaration site variance, its wildcard is lost after asMemberOf call. For example, the type of the field
A<? extends Number> a;
becomes(A<(Number..Number?)>..A<(Number..Number?)>?)
instead of(A<out (Number..Number?)>..A<out (Number..Number?)>?)
, whereA
is defined asinterface A<out T>
.Repro: https://github.com/kuanyingchou/ksp/commit/8b1075bf3839732fcacbf9d95919c96ab345784f