Skip to content

Consider renaming (or rewriting) KotlinSplitterSpec.function to make the project compilable with Kotlin K2 #9028

Closed
@KvanTTT

Description

@KvanTTT

Expected Behavior

The project is compiled succesfully if switch Kotlin to some new K2 version (for instance, 2.0.0-Beta4).

Current Behavior

Compilation fails with the following error:

spring-integration/spring-integration-core/src/main/kotlin/org/springframework/integration/dsl/KotlinSplitterSpec.kt:36:3 : Inline function 'fun <reified P> function(crossinline function:
 (P) -> Any): Unit' cannot be recursive

Context

It looks like the function callee resolving is incorrect in case of using inheritance, Java, type parameters and SAM. See https://youtrack.jetbrains.com/issue/KT-66663 for detail.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions