Destructure intention: entries / entrySet are now removed only for kotlin.Map inheritors #KT-14244 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class MyMap {
|
||||
val entries = listOf<Map.Entry<Int, Int>>()
|
||||
}
|
||||
|
||||
fun foo(mm: MyMap) {
|
||||
for (entry<caret> in mm.entries) {
|
||||
val (key, value) = entry
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class MyMap {
|
||||
val entries = listOf<Map.Entry<Int, Int>>()
|
||||
}
|
||||
|
||||
fun foo(mm: MyMap) {
|
||||
for ((key, value) in mm.entries) {
|
||||
}
|
||||
}
|
||||
@@ -231,4 +231,12 @@
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Use destructuring declaration</problem_class>
|
||||
<description>Use destructuring declaration</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>FakeEntries.kt</file>
|
||||
<line>8</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/FakeEntries.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Use destructuring declaration</problem_class>
|
||||
<description>Use destructuring declaration</description>
|
||||
</problem>
|
||||
</problems>
|
||||
Reference in New Issue
Block a user