mirror of
https://github.com/HiPhish/rainbow-delimiters.nvim.git
synced 2024-09-16 14:24:05 +02:00
Kotlin: fix pattern for when
without subject
This commit is contained in:
parent
8ee0af5e32
commit
c6dce365e6
2 changed files with 8 additions and 2 deletions
|
@ -36,9 +36,9 @@
|
|||
")" @delimiter @sentinel) @container
|
||||
|
||||
(when_expression
|
||||
subject: (when_subject
|
||||
(when_subject
|
||||
"(" @delimiter
|
||||
")" @delimiter)
|
||||
")" @delimiter)?
|
||||
"{" @delimiter
|
||||
"}" @delimiter @sentinel) @container
|
||||
|
||||
|
|
|
@ -85,6 +85,12 @@ when (x) {
|
|||
else -> println("x is neither 1 nor 2")
|
||||
}
|
||||
|
||||
when {
|
||||
1 == 1 -> print("1")
|
||||
else -> print("not")
|
||||
}
|
||||
|
||||
|
||||
val rows = 2
|
||||
val cols = 3
|
||||
val matrix = Array(rows) { IntArray(cols) }
|
||||
|
|
Loading…
Reference in a new issue