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

View File

@ -9,6 +9,6 @@ org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx4096m org.gradle.jvmargs=-Xmx4096m
org.gradle.parallel=true org.gradle.parallel=true
org.gradle.workers.max=4 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 #kotlin.experimental.tryK2=true
#kscience.wasm.disabled=true #kscience.wasm.disabled=true

View File

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

View File

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