Kotlin: Add support for Kotlin 2.3.0-Beta2

This commit is contained in:
Anders Fugmann
2025-12-04 16:14:13 +01:00
parent 90dd3b9449
commit 144510c23d
7 changed files with 26 additions and 6 deletions

View File

@@ -230,6 +230,7 @@ use_repo(
"kotlin-compiler-2.1.20-Beta1",
"kotlin-compiler-2.2.0-Beta1",
"kotlin-compiler-2.2.20-Beta2",
"kotlin-compiler-2.3.0-Beta2",
"kotlin-compiler-embeddable-1.8.0",
"kotlin-compiler-embeddable-1.9.0-Beta",
"kotlin-compiler-embeddable-1.9.20-Beta",
@@ -239,6 +240,7 @@ use_repo(
"kotlin-compiler-embeddable-2.1.20-Beta1",
"kotlin-compiler-embeddable-2.2.0-Beta1",
"kotlin-compiler-embeddable-2.2.20-Beta2",
"kotlin-compiler-embeddable-2.3.0-Beta2",
"kotlin-stdlib-1.8.0",
"kotlin-stdlib-1.9.0-Beta",
"kotlin-stdlib-1.9.20-Beta",
@@ -248,6 +250,7 @@ use_repo(
"kotlin-stdlib-2.1.20-Beta1",
"kotlin-stdlib-2.2.0-Beta1",
"kotlin-stdlib-2.2.20-Beta2",
"kotlin-stdlib-2.3.0-Beta2",
)
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")

BIN
java/kotlin-extractor/deps/kotlin-compiler-2.3.0-Beta2.jar (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
java/kotlin-extractor/deps/kotlin-stdlib-2.3.0-Beta2.jar (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1645,7 +1645,7 @@ open class KotlinFileExtractor(
extractMethodAndParameterTypeAccesses: Boolean,
typeSubstitution: TypeSubstitution?,
classTypeArgsIncludingOuterClasses: List<IrTypeArgument>?
) =
) : Label<out DbCallable> =
forceExtractFunction(
f,
parentId,
@@ -2975,12 +2975,22 @@ open class KotlinFileExtractor(
val locId = tw.getLocation(s)
tw.writeStmts_block(blockId, parent, idx, callable)
tw.writeHasLocation(blockId, locId)
extractVariable(s.delegate, callable, blockId, 0)
// For Kotlin < 2.3, s.deligate is not-nullable. Cast to a be nullable,
// as a workaround to silence warnings for kotlin < 2.3 about the elvis
// operator being redundant.
// For Kotlin >= 2.3, the cast is redundant, so we need to silence that warning
@Suppress("USELESS_CAST")
val delegate = (s.delegate as IrVariable?) ?: run {
logger.errorElement("Local delegated property is missing delegate", s)
return
}
extractVariable(delegate, callable, blockId, 0)
val propId = tw.getFreshIdLabel<DbKt_property>()
tw.writeKtProperties(propId, s.name.asString())
tw.writeHasLocation(propId, locId)
tw.writeKtPropertyDelegates(propId, useVariable(s.delegate))
tw.writeKtPropertyDelegates(propId, useVariable(delegate))
// Getter:
extractStatement(s.getter, callable, blockId, 1)

View File

@@ -849,9 +849,6 @@ open class KotlinUsesExtractor(
}
private fun useSimpleType(s: IrSimpleType, context: TypeContext): TypeResults {
if (s.abbreviation != null) {
// TODO: Extract this information
}
// We use this when we don't actually have an IrClass for a class
// we want to refer to
// TODO: Eliminate the need for this if possible

View File

@@ -9,6 +9,7 @@ VERSIONS = [
"2.1.20-Beta1",
"2.2.0-Beta1",
"2.2.20-Beta2",
"2.3.0-Beta2",
]
def _version_to_tuple(v):