Skip to content

burstValues with lambdas cause "Platform declaration clash: The following declarations have the same JVM signature" #284

@consp1racy

Description

@consp1racy

Notes

  • AGP 9 with Built-in Kotlin 2.3.0 and Burst 2.11.0.
  • Burst 2.11.0 doesn't work with Kotlin 2.2.x so N/A.
  • Burst 2.10.2 with Kotlin 2.2.21 works fine.
  • Affects both host tests and device tests.

Sample project

@Burst
class ExampleUnitTest(
    val case : Case = burstValues(
        Case { },
        Case { },
        Case { },
        Case { },
        Case { },
    )
) {

    class Case(
        val provideSubject: () -> Unit,
    )

    @Test
    fun test() {
        val subject = case.provideSubject()
    }
}

> Task :app:compileDebugUnitTestKotlin FAILED
e: file:///C:/Users/epech/Android/Testing/BurstLambdas/app/src/test/kotlin/ExampleUnitTest.kt:9:1 Platform declaration clash: The following declarations have the same JVM signature (access$ExampleUnitTest$_init_$lambda$0()Lkotlin/Unit;):
    fun `access$ExampleUnitTest$_init_$lambda$0`(): Unit? defined in com.example.burstlambdas.ExampleUnitTest
    fun `access$ExampleUnitTest$_init_$lambda$0`(): Unit? defined in com.example.burstlambdas.ExampleUnitTest
    fun `access$ExampleUnitTest$_init_$lambda$0`(): Unit? defined in com.example.burstlambdas.ExampleUnitTest
    fun `access$ExampleUnitTest$_init_$lambda$0`(): Unit? defined in com.example.burstlambdas.ExampleUnitTest

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions