diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2c7696c..92a7a74c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: needs: build strategy: matrix: - poko_sample_kotlin_version: [ 2.0.20, ~, 2.1.0-Beta2 ] + poko_sample_kotlin_version: [ 2.0.0, 2.0.10, 2.0.20, ~, 2.1.0-Beta2 ] env: poko_sample_kotlin_version: ${{ matrix.poko_sample_kotlin_version }} steps: diff --git a/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/ir/PokoMembersTransformer.kt b/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/ir/PokoMembersTransformer.kt index 57acec0b..8c706c63 100644 --- a/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/ir/PokoMembersTransformer.kt +++ b/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/ir/PokoMembersTransformer.kt @@ -189,6 +189,7 @@ internal class PokoMembersTransformer( * available. Provides forward compatibility with 2.0.20, which changes the constructor's * signature. */ + // TODO: Revert to standard IrValueParameterSymbolImpl when support for 2.0.10 is dropped @Suppress("FunctionName") // Factory private fun IrValueParameterSymbolImplCompat( descriptor: ParameterDescriptor, diff --git a/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/ir/functionGeneration.kt b/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/ir/functionGeneration.kt index e325fcbe..c167da47 100644 --- a/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/ir/functionGeneration.kt +++ b/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/ir/functionGeneration.kt @@ -54,6 +54,7 @@ internal fun IrFunction.receiver(): IrGetValue = IrGetValueImpl(dispatchReceiver * Invoke [IrGetValueImpl] via reflection if the known function is not available. Provides forward * compatibility with 2.0.20, which changes the constructor's signature. */ +// TODO: Revert to standard IrGetValueImpl when support for 2.0.10 is dropped context(IrBlockBodyBuilder) internal fun IrGetValueImpl( parameter: IrValueParameter, diff --git a/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/ir/hashCodeGeneration.kt b/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/ir/hashCodeGeneration.kt index b14e1698..ab4dc28a 100644 --- a/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/ir/hashCodeGeneration.kt +++ b/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/ir/hashCodeGeneration.kt @@ -351,6 +351,7 @@ private fun IrBlockBodyBuilder.irCallHashCodeFunction( * Instantiate an [IrVariableImpl]. Backward-compatible with Kotlin 2.0.0—which used a * constructor instead of a factory function—via reflection. */ +// TODO: Revert to standard IrVariableImpl when 2.0.10 support is dropped @Suppress("FunctionName", "SameParameterValue") // Factory private fun IrVariableImplCompat( startOffset: Int, @@ -376,7 +377,6 @@ private fun IrVariableImplCompat( isLateinit = isLateinit, ) } catch (noSuchMethodError: NoSuchMethodError) { - // TODO: Test whether this is the write exception type // Constructor pre-2.0.20: origin.javaClass.classLoader .loadClass("org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl")