mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
'Subject.Error' is redundant. 'Subject.None' can be an object. 'Subject#dataFlowValue' can be a lateinit property. TODO: fix - parsing local extension properties in 'when' subject - parsing destructuring declarations in 'when' subject - non-completed calls in nested 'when' with subject variable - non-completed calls for subject variable in 'in' pattern
8 lines
174 B
Kotlin
Vendored
8 lines
174 B
Kotlin
Vendored
// !LANGUAGE: +VariableDeclarationInWhenSubject
|
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
|
|
|
|
fun test(x: Any) {
|
|
when (val y = x) {
|
|
is String -> {}
|
|
}
|
|
} |