Kotlin 2.1 and friends (#1966)

* Kotlin 2.1 and friends

* fix kotlin 2.1 aliases nullability (#1982)

---------

Co-authored-by: Florian LE FICHER <florian.leficher@gmail.com>
This commit is contained in:
Jake Wharton
2025-08-27 20:46:36 -04:00
committed by GitHub
parent 956776edbb
commit ae4e728e7a
9 changed files with 139 additions and 96 deletions

View File

@@ -35,8 +35,9 @@ tasks.withType<Test>().configureEach {
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
allWarningsAsErrors.set(true)
freeCompilerArgs.add(
freeCompilerArgs.addAll(
"-opt-in=kotlin.ExperimentalStdlibApi",
"-Xannotation-default-target=param-property",
)
}
}

View File

@@ -36,8 +36,9 @@ tasks.withType<Test>().configureEach {
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
allWarningsAsErrors.set(true)
freeCompilerArgs.add(
freeCompilerArgs.addAll(
"-opt-in=kotlin.ExperimentalStdlibApi",
"-Xannotation-default-target=param-property",
)
}
}

View File

@@ -487,7 +487,7 @@ class DualKotlinTest {
val parameterized: GenericClass<TypeAlias>,
val wildcardIn: GenericClass<in TypeAlias>,
val wildcardOut: GenericClass<out TypeAlias>,
val complex: GenericClass<GenericTypeAlias>?,
val complex: GenericClass<GenericTypeAlias?>?,
)
// Regression test for https://github.com/square/moshi/issues/991