Don't suggest "return type is..." inspections for anonymous functions
#KT-29290 Fixed
This commit is contained in:
-18
@@ -71,24 +71,6 @@
|
||||
<problem_class severity="WEAK WARNING" attribute_key="INFO_ATTRIBUTES">Function returning Result directly</problem_class>
|
||||
<description>Function returning Result with a name that does not end with Catching</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>38</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<package><default></package>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WEAK WARNING" attribute_key="INFO_ATTRIBUTES">Function returning Result directly</problem_class>
|
||||
<description>Function returning Result with a name that does not end with Catching</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>40</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<package><default></package>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WEAK WARNING" attribute_key="INFO_ATTRIBUTES">Function returning Result directly</problem_class>
|
||||
<description>Function returning Result with a name that does not end with Catching</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>60</line>
|
||||
|
||||
@@ -34,9 +34,9 @@ class Container {
|
||||
fun test() {
|
||||
// YES
|
||||
fun localGetSuccess() = Result("123")
|
||||
// YES
|
||||
// NO (no name)
|
||||
val anonymous = fun() = Result(45)
|
||||
// YES
|
||||
// NO (no name)
|
||||
val lambda = { Result(true) }
|
||||
// NO yet (we do not report local *catching functions)
|
||||
fun localCatching() = Result(2.72)
|
||||
|
||||
Reference in New Issue
Block a user