maxkeppeler / sheets

⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.
https://maxkeppeler.github.io/sheets/
Apache License 2.0
921 stars 77 forks source link

Exception during IR lowering #73

Closed dehghanGit closed 3 years ago

dehghanGit commented 3 years ago

bug: Compile time exception when I try to run this code:

InputSheet().show(context) {
        title("Short survey")
        style(SheetStyle.BOTTOM_SHEET)
        with(
            InputEditText {
                label("Your favorite TV-Show")
                hint("The Mandalorian, ...")
            }
        )

        onPositive {
            Log.i(TAG, "createAddNewCourseDialog: Positive" )
        }
        onNegative{
            Log.i(TAG, "createAddNewCourseDialog: Negative" )
        }

Error:

org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
File being compiled: /*address*/Dialog.kt
The root cause java.lang.AssertionError was thrown at: org.jetbrains.kotlin.ir.util.TypeTranslator.toIrTypeAbbreviation(TypeTranslator.kt:167)

Also when I delete onNegative, it will be compile and run successfully.

Library Version: 2.2.4

Kotlin Version: 1.5.10

maxkeppeler commented 3 years ago

This appears to be the same issue as #57, which was fixed with Kotlin 1.5.20-RC. (Thanks to @russellbanks for the info.)