-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotlin & KSP 2.1.0 #2029
base: main
Are you sure you want to change the base?
Kotlin & KSP 2.1.0 #2029
Conversation
@@ -202,7 +202,7 @@ public class AnnotationSpec private constructor( | |||
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") | |||
val javaAnnotation = annotation as java.lang.annotation.Annotation | |||
val builder = builder(javaAnnotation.annotationType()) | |||
.tag(annotation) | |||
.tag<Annotation>(annotation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes the following warning:
e: warnings found and -Werror specified
w: file:///Users/egor/Development/block-workspace/kotlinpoet/kotlinpoet/src/jvmMain/kotlin/com/squareup/kotlinpoet/AnnotationSpec.kt:205:12
Type argument for reified type parameter 'T' was inferred to the intersection
of ['java.lang.annotation.Annotation' & 'kotlin.Annotation'].
Reification of an intersection type results in the common supertype being used.
This may lead to subtle issues and an explicit type argument is encouraged.
This will become an error in a future release.
@ZacSweers there's a bunch of
I discovered that if I simply comment out the |
public fun <T : Alias41<Alias23, out Alias77<Alias73<Int>>>> bar(vararg arg1: T): Unit = TODO() | ||
} | ||
public class TestTransitiveAliases { | ||
public fun <T : Alias41<Alias43<Alias23>, Alias47<out Alias77<Alias73<Int>>>>> bar(vararg arg1: T): Unit = TODO() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this started behaving differently with KSP. @ZacSweers any thoughts?
I'll look after vacation! |
No description provided.