ConvertLambdaToReference refactoring
Intention is not registered now; inspection is enabled by default now, but has highlight level of "No highlighting" Inspection does not depend on text length now So #KT-14335 Fixed
This commit is contained in:
+9
-1
@@ -9,7 +9,15 @@
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>14</line>
|
||||
<line>9</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Can be replaced with function reference</problem_class>
|
||||
<description>Convert lambda to reference</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>13</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Can be replaced with function reference</problem_class>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
class TheirWrapper(val x: Int)
|
||||
val x = { y: Int -> TheirWrapper(y) }
|
||||
|
||||
// Should not suggest to convert (too long reference)
|
||||
// Should suggest to convert despite of too long reference
|
||||
fun foo(arg: TheirWrapper, convert: (TheirWrapper) -> String) = convert(arg)
|
||||
val y = foo(TheirWrapper(42)) { it.toString() }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user