'val' in 'when' subject can't have modifiers (annotations are ok)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
fun test() {
|
||||
when (abstract) {}
|
||||
when (enum) {}
|
||||
when (open) {}
|
||||
when (inner) {}
|
||||
when (override) {}
|
||||
when (private) {}
|
||||
when (public) {}
|
||||
when (internal) {}
|
||||
when (protected) {}
|
||||
when (out) {} // NB 'in' is a hard keyword
|
||||
when (final) {}
|
||||
when (vararg) {}
|
||||
when (reified) {}
|
||||
when (companion) {}
|
||||
when (sealed) {}
|
||||
when (lateinit) {}
|
||||
when (data) {}
|
||||
when (inline) {}
|
||||
when (noinline) {}
|
||||
when (tailrec) {}
|
||||
when (external) {}
|
||||
when (annotation) {}
|
||||
when (crossinline) {}
|
||||
when (const) {}
|
||||
when (operator) {}
|
||||
when (infix) {}
|
||||
when (suspend) {}
|
||||
}
|
||||
Reference in New Issue
Block a user