Introduct "Redundant 'with' call" inspection #KT-6633 Fixed
This commit is contained in:
committed by
Natalia Selezneva
parent
58becffb1f
commit
4c34ced1fa
@@ -0,0 +1,10 @@
|
||||
fun test() {
|
||||
with(foo()) {
|
||||
println("test")
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(): String {
|
||||
println("foo")
|
||||
return ""
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>callReceiver.kt</file>
|
||||
<line>2</line>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/callReceiver.kt" />
|
||||
<problem_class severity="WEAK WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant 'with' call</problem_class>
|
||||
<description>Redundant 'with' call</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1,2 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.RedundantWithInspection
|
||||
// WITH_RUNTIME
|
||||
Reference in New Issue
Block a user