// Generated from "j2kt/LambdaReturnFromBlock.java"
@file:Suppress(
 "ALWAYS_NULL",
 "PARAMETER_NAME_CHANGED_ON_OVERRIDE",
 "SENSELESS_COMPARISON",
 "UNCHECKED_CAST",
 "UNNECESSARY_LATEINIT",
 "UNNECESSARY_NOT_NULL_ASSERTION",
 "UNREACHABLE_CODE",
 "UNUSED_ANONYMOUS_PARAMETER",
 "UNUSED_PARAMETER",
 "UNUSED_VARIABLE",
 "USELESS_CAST",
 "VARIABLE_IN_SINGLETON_WITHOUT_THREAD_LOCAL",
 "VARIABLE_WITH_REDUNDANT_INITIALIZER",
 "REDUNDANT_ELSE_IN_WHEN")

package j2kt

import javaemul.lang.*
import java.lang.AssertionError
import java.lang.Void
import javaemul.lang.J2ktMonitor
import kotlin.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmField
import kotlin.synchronized

open class LambdaReturnFromBlock {
 open fun testDoWhile() {
  val fn: Function<Void> = Function {
   return@Function null
  } as Function<Void>
 }

 open fun testSynchronized() {
  val fn: Function<Void> = Function {
   synchronized<Unit>(LambdaReturnFromBlock.lock) {
    return@Function null
   }
   throw AssertionError("Unreachable")
  } as Function<Void>
 }

 @JvmField
 internal var x_pp_j2kt: Int = 1

 open fun testSwitchInLambda() {
  val fn: Function<Void> = Function {
   when (this.x_pp_j2kt) {
    1 -> {
     return@Function null
    }
    else -> {
     return@Function null
    }
   }
   throw AssertionError("Unreachable")
  } as Function<Void>
 }

 companion object {
  private val lock: J2ktMonitor = J2ktMonitor()
 }

 fun interface Function<O> {
  fun apply(): O
 }
}
