-
Notifications
You must be signed in to change notification settings - Fork 294
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.10 #2029
Kotlin & KSP 2.1.10 #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! |
KSP 2.1.0-1.0.29 kct 0.7.0
370c17e
to
073df16
Compare
b276780
to
30ee3e4
Compare
30ee3e4
to
08e7639
Compare
@Before | ||
fun skipOnJdk8() { | ||
val javaVersion = System.getProperty("java.version") ?: return // Don't skip if version unknown. | ||
assumeFalse( | ||
"These tests currently fail on JDK 8 when useKsp2 == false", | ||
javaVersion.startsWith("1.8") && !useKsp2, | ||
) | ||
} |
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.
Turning off these tests for now as they fail with an "internal error". Seems okay since it's just on JDK 8.
No description provided.