Refactoring: "replace with operator assignment" is now an inspection

This commit is contained in:
Mikhail Glukhikh
2017-12-20 20:01:12 +03:00
parent c995f70631
commit 35d85ddd1f
26 changed files with 131 additions and 127 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.inspections.ReplaceWithOperatorAssignmentInspection
@@ -1,4 +1,4 @@
// IS_APPLICABLE: false
// PROBLEM: none
// WITH_RUNTIME
fun foo() {
var list1 = java.util.Collections.emptyList<String>()
@@ -1,4 +1,4 @@
// IS_APPLICABLE: false
// PROBLEM: none
fun foo() {
var x = 0
x =<caret> x / 1 + 1
@@ -1,4 +1,4 @@
// IS_APPLICABLE: false
// PROBLEM: none
fun foo() {
var x = 0
val y = 0
@@ -1,4 +1,4 @@
// IS_APPLICABLE: false
// PROBLEM: none
fun foo() {
var x = 0
<caret>x = 1 - x
@@ -1,4 +1,4 @@
// IS_APPLICABLE: false
// PROBLEM: none
fun foo() {
var x = 0
x =<caret> x - 1 - 1
@@ -1,4 +1,4 @@
// IS_APPLICABLE: false
// PROBLEM: none
fun foo() {
var x = 0
val y = 0
@@ -1,4 +1,4 @@
// IS_APPLICABLE: false
// PROBLEM: none
class A
operator fun A.plus(a: A): A = A()
@@ -1 +0,0 @@
org.jetbrains.kotlin.idea.intentions.ReplaceWithOperatorAssignmentIntention