Skip to content

Wrong IR or JVM bytecode generation with empty try  #174

Description

@DaniilStepanov

Example:

    var lambda: (() -> String)? = null

    fun f() {
        try {
        } finally {
            lambda = { "OK" }
        }
    }
    @JvmStatic
    fun box(): String {
        f()
        return lambda?.let { it() } ?: "fail"
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingir

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions