[NI] Disable caching of LHS expression types for "+=" operators

New behavior was introduced in ab506c1579 which breaks compilation on IDE module (see test example) for new inference.

 Now we temporarily disable this optimisation. This is temporarily restriction which will be fixed once we'll have the same rules for lambdas completion

 #KT-34889 Open
This commit is contained in:
Mikhail Zarechenskiy
2019-11-13 14:03:47 +03:00
parent 4973baae4e
commit 455b9f852d
6 changed files with 36 additions and 2 deletions
@@ -0,0 +1,11 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun <T> Iterable<T>.filter(predicate: (T) -> Boolean): List<T> = TODO()
operator fun <T> Collection<T>.plus(elements: Iterable<T>): List<T> = TODO()
fun stringCollection(): Collection<String> = TODO()
fun <K> test(c: Collection<K>) {
var variants = stringCollection()
variants += variants.filter { true }
}
@@ -0,0 +1,6 @@
package
public fun stringCollection(): kotlin.collections.Collection<kotlin.String>
public fun </*0*/ K> test(/*0*/ c: kotlin.collections.Collection<K>): kotlin.Unit
public fun </*0*/ T> kotlin.collections.Iterable<T>.filter(/*0*/ predicate: (T) -> kotlin.Boolean): kotlin.collections.List<T>
public operator fun </*0*/ T> kotlin.collections.Collection<T>.plus(/*0*/ elements: kotlin.collections.Iterable<T>): kotlin.collections.List<T>