Use of expressions instead of plain text when converting when's
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// ERROR: Expected condition of type kotlin.Boolean
|
||||
// ERROR: Expected condition of type kotlin.Boolean
|
||||
|
||||
fun test(n: Int): String {
|
||||
return <caret>when {
|
||||
is String -> "String"
|
||||
in 1..10 -> "1..10"
|
||||
else -> "unknown"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user