Skip to content

Commit 4c549b5

Browse files
committed
Reapply "UPDATE_KOTLIN_VERSION: 2.0.0-dev-4562"
This reverts commit a2b9298.
1 parent fbd2665 commit 4c549b5

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/binary/KSDeclarationDescriptorImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ package com.google.devtools.ksp.symbol.impl.binary
2020
import com.google.devtools.ksp.common.impl.KSNameImpl
2121
import com.google.devtools.ksp.common.memoized
2222
import com.google.devtools.ksp.symbol.*
23-
import org.jetbrains.kotlin.backend.common.serialization.findPackage
2423
import org.jetbrains.kotlin.descriptors.ClassDescriptor
2524
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
2625
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
26+
import org.jetbrains.kotlin.descriptors.findPackage
2727
import org.jetbrains.kotlin.load.java.descriptors.JavaClassDescriptor
2828
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
2929
import org.jetbrains.kotlin.resolve.descriptorUtil.parents
@@ -50,7 +50,7 @@ abstract class KSDeclarationDescriptorImpl(private val descriptor: DeclarationDe
5050
is ClassDescriptor -> KSClassDeclarationDescriptorImpl.getCached(containingDescriptor)
5151
is FunctionDescriptor -> KSFunctionDeclarationDescriptorImpl.getCached(containingDescriptor)
5252
else -> null
53-
} as KSDeclaration?
53+
}
5454
}
5555

5656
override val parent: KSNode? by lazy {

integration-tests/src/test/kotlin/com/google/devtools/ksp/test/KSPCmdLineOptionsIT.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class KSPCmdLineOptionsIT(val useKSP2: Boolean) {
3838
}.maxByOrNull { it.lastModified() }!!
3939
val compilerArgs = mutableListOf(
4040
"-no-stdlib",
41+
"-language-version", "1.9",
4142
"-Xplugin=${kspPluginJar.absolutePath}",
4243
"-Xplugin=${kspApiJar.absolutePath}",
4344
"-P", "plugin:$kspPluginId:apclasspath=${processorJar.absolutePath}",

integration-tests/src/test/kotlin/com/google/devtools/ksp/test/PlaygroundIT.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ class PlaygroundIT(val useKSP2: Boolean) {
223223
Assert.assertTrue(jarFile.getEntry("hello/HELLO.class").size > 0)
224224
Assert.assertTrue(jarFile.getEntry("com/example/AClassBuilder.class").size > 0)
225225
}
226-
Assert.assertTrue(result.output.contains("w: Language version 2.0 is experimental"))
227226
project.restore(buildFile.path)
228227
}
229228

@@ -263,7 +262,6 @@ class PlaygroundIT(val useKSP2: Boolean) {
263262
Assert.assertTrue(jarFile.getEntry("hello/HELLO.class").size > 0)
264263
Assert.assertTrue(jarFile.getEntry("com/example/AClassBuilder.class").size > 0)
265264
}
266-
Assert.assertTrue(result.output.contains("w: Language version 2.0 is experimental"))
267265
project.restore(buildFile.path)
268266
project.restore(gradleProperties.path)
269267
}
@@ -303,12 +301,12 @@ class PlaygroundIT(val useKSP2: Boolean) {
303301
gradleRunner.withArguments("build").buildAndFail().let {
304302
Assert.assertEquals(TaskOutcome.SUCCESS, it.task(":workload:kspKotlin")?.outcome)
305303
Assert.assertEquals(TaskOutcome.FAILED, it.task(":workload:compileKotlin")?.outcome)
306-
Assert.assertTrue("Unresolved reference: AClassBuilder" in it.output)
304+
Assert.assertTrue("Unresolved reference 'AClassBuilder'" in it.output)
307305
}
308306
gradleRunner.withArguments("build").buildAndFail().let {
309307
Assert.assertEquals(TaskOutcome.UP_TO_DATE, it.task(":workload:kspKotlin")?.outcome)
310308
Assert.assertEquals(TaskOutcome.FAILED, it.task(":workload:compileKotlin")?.outcome)
311-
Assert.assertTrue("Unresolved reference: AClassBuilder" in it.output)
309+
Assert.assertTrue("Unresolved reference 'AClassBuilder'" in it.output)
312310
}
313311

314312
project.restore("workload/build.gradle.kts")

0 commit comments

Comments
 (0)