Add "Suspicious collection reassignment" inspection #KT-20626 Fixed

This commit is contained in:
Mikhail Glukhikh
2018-11-29 16:23:00 +03:00
parent 3e936f64bf
commit c560aada3d
68 changed files with 1201 additions and 0 deletions
@@ -0,0 +1,7 @@
// PROBLEM: none
// ERROR: Assignment operators ambiguity: <br>public operator fun <K, V> Map<out Int, Int>.plus(pair: Pair<Int, Int>): Map<Int, Int> defined in kotlin.collections<br>@InlineOnly public inline operator fun <K, V> MutableMap<in Int, in Int>.plusAssign(pair: Pair<Int, Int>): Unit defined in kotlin.collections
// WITH_RUNTIME
fun test() {
var map = mutableMapOf(1 to 2)
map <caret>+= 3 to 4
}