Files
Marco Pennekamp fb43e53ca3 [LL FIR] KTIJ-24574 Fix containing declaration finder for init blocks
- KTIJ-24574 occurred because a local destructuring declaration was
  erroneously returned as the non-local containing declaration of an
  element by `getNonLocalContainingOrThisDeclaration`. This occurred in
  `init` blocks.

KTIJ-24574 fixed
2023-02-13 10:38:26 +00:00

12 lines
245 B
Kotlin
Vendored

var x: Any = 2
class Test {
init {
val (type, entityName) = when {
x is Int -> Int::class.java to "Int"
<caret>x is String -> String::class.java to "String"
else -> null to null
}
}
}