From 15a595749b70998cc13ac014f9bc52b9cee1e6dc Mon Sep 17 00:00:00 2001 From: Dmitry Savvinov Date: Thu, 30 Nov 2017 21:17:36 +0300 Subject: [PATCH] [NI] Weird testdata change after fixes in ErrorTypes The issue here is that OI infers correct types for (k, v) destructing declaration, while NI infers errors for them. That happens because NI resolves iterator() on nullable 'm', but rightfully reports it as unsuccessful, while OI somehow manages to resolve it to success (and thus getting nice expected type, allowing destructing declaration to be resolved in a proper types). --- .../tests/smartCasts/varnotnull/unnecessaryWithMap.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt index fcb1401dc28..76dcbf2a3fe 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt @@ -14,7 +14,7 @@ class MyClass { m = create() // See KT-7428 for ((k, v) in m) - res += (k.length + v.length) + res += (k.length + v.length) return res } } \ No newline at end of file