Kotlin 2.0.20-Beta2

This commit is contained in:
Alexander Nozik 2024-07-25 10:09:26 +03:00
parent 07aeec6dfb
commit 0a90d2e8c9
4 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,6 @@
@file:Suppress("UNUSED_VARIABLE")
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
import space.kscience.kmath.benchmarks.addBenchmarkProperties
@ -161,9 +162,9 @@ kotlin.sourceSets.all {
}
tasks.withType<KotlinJvmCompile> {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all" + "-Xlambdas=indy"
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
freeCompilerArgs.addAll("-Xjvm-default=all", "-Xlambdas=indy")
}
}

View File

@ -9,6 +9,6 @@ org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx4096m
org.gradle.parallel=true
org.gradle.workers.max=4
toolsVersion=0.15.4-kotlin-2.0.20-Beta1
toolsVersion=0.15.5-kotlin-2.0.20-Beta2
#kotlin.experimental.tryK2=true
#kscience.wasm.disabled=true

View File

@ -8,7 +8,6 @@
"OVERRIDING_FINAL_MEMBER",
"RETURN_TYPE_MISMATCH_ON_OVERRIDE",
"CONFLICTING_OVERLOADS",
"NO_EXPLICIT_VISIBILITY_IN_API_MODE_WARNING",
"ObjectPropertyName",
"ClassName",
)

View File

@ -159,7 +159,7 @@ class Rational {
override fun equals(other: Any?): Boolean =
when (other) {
is Rational -> numerator == other.numerator && denominator == other.denominator
is Int -> numerator == other && denominator == 1L
is Int -> numerator == other.toLong() && denominator == 1L
is Long -> numerator == other && denominator == 1L
else -> false
}