Create From Usage: Do not suggest "val" for references used as assignment left-hand side
This commit is contained in:
@@ -345,4 +345,9 @@ public fun PsiElement.siblings(forward: Boolean = true, withItself: Boolean = tr
|
||||
public fun PsiElement.parents(withItself: Boolean = true): Stream<PsiElement> {
|
||||
val stream = stream(this) { if (it is PsiFile) null else it.getParent() }
|
||||
return if (withItself) stream else stream.drop(1)
|
||||
}
|
||||
|
||||
public fun JetExpression.getAssignmentByLHS(): JetBinaryExpression? {
|
||||
val parent = getParent() as? JetBinaryExpression ?: return null
|
||||
return if (JetPsiUtil.isAssignment(parent) && parent.getLeft() == this) parent else null
|
||||
}
|
||||
Reference in New Issue
Block a user