Skip to content

Commit

Permalink
Re-add sample tests against 2.0.0 and 2.0.10
Browse files Browse the repository at this point in the history
The fix that Jake found in #411 may result in these tests passing now.
  • Loading branch information
drewhamilton committed Oct 18, 2024
1 parent ae956a5 commit 8bd203d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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")
Expand Down

0 comments on commit 8bd203d

Please sign in to comment.