Add inspection to detect is checks for object types #KT-21741 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
247881baf9
commit
84a6ef6ac4
@@ -379,6 +379,11 @@ class KtPsiFactory @JvmOverloads constructor(private val project: Project, val m
|
||||
return whenEntry
|
||||
}
|
||||
|
||||
fun createWhenCondition(conditionText: String): KtWhenCondition {
|
||||
val whenEntry = createWhenEntry("$conditionText -> {}")
|
||||
return whenEntry.conditions[0]
|
||||
}
|
||||
|
||||
fun createBlockStringTemplateEntry(expression: KtExpression): KtStringTemplateEntryWithExpression {
|
||||
// We don't want reformatting here as it can potentially change something in raw strings
|
||||
val stringTemplateExpression = createExpressionByPattern("\"$\${$0}\"", expression, reformat = false) as KtStringTemplateExpression
|
||||
|
||||
Reference in New Issue
Block a user