Bad condition for cast in KotlinStatementsSurrounder (EA-119701)

This commit is contained in:
Nikolay Krasko
2018-05-09 02:41:01 +03:00
parent 9e2412b887
commit c469a4d9b9
@@ -35,7 +35,7 @@ public abstract class KotlinStatementsSurrounder implements Surrounder {
return false;
}
if (elements.length == 1 || elements[0] instanceof KtExpression) {
if (elements.length == 1 && elements[0] instanceof KtExpression) {
if (!isApplicableWhenUsedAsExpression() && KotlinSurrounderUtils.isUsedAsExpression((KtExpression) elements[0])) {
return false;
}