Refactoring + minor fixes: destructure intention
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// IS_APPLICABLE: false
|
||||
// WITH_RUNTIME
|
||||
|
||||
data class XY(val x: String, val y: Int)
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
data class XY(val x: String, val y: Int)
|
||||
fun test(xys: Array<XY>) {
|
||||
for ((x) in xys) {
|
||||
println(x)
|
||||
val xx = x
|
||||
println(xx)
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
// IS_APPLICABLE: false
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val map = hashMapOf(1 to 1)
|
||||
for ((key) in map) {
|
||||
val key2 = key
|
||||
|
||||
println(key)
|
||||
}
|
||||
}
|
||||
@@ -175,4 +175,20 @@
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Use destructuring declaration</problem_class>
|
||||
<description>Use destructuring declaration</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>OnlyKeyUsed.kt</file>
|
||||
<line>5</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/OnlyKeyUsed.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Use destructuring declaration</problem_class>
|
||||
<description>Use destructuring declaration</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>DataClassTwoDifferentLocals.kt</file>
|
||||
<line>5</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/DataClassTwoDifferentLocals.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