d

    dimsuz

    2 years ago
    I have found a bug while using
    dev13
    , does anyone by chance know if its fixed, or should I report it? Asking because upgrading to later versions could require some effort.
    Button(
      modifier = if (enabled || MaterialTheme.colors.isLight) borderModifier else Modifier
    )
    Reversing the order of condition operands fixes compilation. This compiles OK:
    Button(
      modifier = if (MaterialTheme.colors.isLight || enabled) borderModifier else Modifier
    )
    I will post a reported exception in the thread >>
    Compiler exception:
    e: java.lang.IllegalStateException: Backend Internal error: Exception during IR lowering
    ...
    Caused by: java.lang.AssertionError: OROR condition should have an 'if a then true' body on its first branch, and an 'if true then b' body on its second branch. Failing expression: WHEN type=kotlin.Boolean origin=OROR
    Adam Powell

    Adam Powell

    2 years ago
    Anything of this nature changed considerably since dev13, please update when you can 🙂
    d

    dimsuz

    2 years ago
    Ok, thanks. Will only report if reproduce this on latest version!
    This is still reproducible on dev17. Will report then.