You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading the annotation instance off of SomeAnnotatedClass in a processor, the String::class types are always error types. I discovered this while preparing KotlinPoet for K2, with a repro available in this PR in the TestProcessorTest.removeDefaultValues test. If you breakpoint the isDefaultValue() check in KSAnnotation.toAnnotationSpec(), you can verify this behavior.
I've also confirmed this happens even if you add an explicit kotlin.String import. This also is the case for the String::class inside an array, which similarly resolves to an error type.
The text was updated successfully, but these errors were encountered:
Tested with 2.0.0-RC1-1.0.20
Given an annotation like so:
When reading the annotation instance off of
SomeAnnotatedClass
in a processor, theString::class
types are always error types. I discovered this while preparing KotlinPoet for K2, with a repro available in this PR in theTestProcessorTest.removeDefaultValues
test. If you breakpoint theisDefaultValue()
check inKSAnnotation.toAnnotationSpec()
, you can verify this behavior.I've also confirmed this happens even if you add an explicit
kotlin.String
import. This also is the case for theString::class
inside an array, which similarly resolves to an error type.The text was updated successfully, but these errors were encountered: