Files
Vladimir Dolzhenko 9c41fe87f6 [kotlin] Added test
#KTIJ-21826 Fixed

GitOrigin-RevId: a1995292ab3d00919db91e19ab677bd832071556
2022-05-27 11:42:03 +00:00

19 lines
579 B
Kotlin

// WITH_STDLIB
// OUT_OF_CODE_BLOCK: FALSE
// SKIP_ANALYZE_CHECK
// TYPE: '"'
// INSPECTION-CLASS: org.jetbrains.kotlin.idea.inspections.KotlinRedundantDiagnosticSuppressInspection
// NO-INSPECTION-OUTPUT
// inspection message `[GENERIC_ERROR_OR_WARNING:8] Redundant suppression` should not appear, therefore `NO-INSPECTION-OUTPUT`
fun convertToMap(converted: Map<*, *>): Map<String, Any>? {
@Suppress("UNCHECKED_CAST")
return converted as Map<String, Any>?
}
fun main() {
val s = "hello<caret>
when (s) {
"hello" -> println(s)
else -> {}
}
}