Object literal to lambda: handle last comment correctly #KT-15670 Fixed
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val r = object: Runnable<caret> {
|
||||
override fun run() {
|
||||
TODO("not implemented") //To change body ...
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val r = Runnable {
|
||||
TODO("not implemented") //To change body ...
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val r = object: Runnable<caret> {
|
||||
override fun run() = TODO("not implemented") //To change body ...
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val r = Runnable {
|
||||
TODO("not implemented") //To change body ...
|
||||
}
|
||||
@@ -166,4 +166,22 @@
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Convert object literal to lambda</problem_class>
|
||||
<description>Convert to lambda</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>WithComment.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/WithComment.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Object literal can be converted to lambda</problem_class>
|
||||
<description>Convert to lambda</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>WithCommentAfterExpression.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/WithCommentAfterExpression.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Object literal can be converted to lambda</problem_class>
|
||||
<description>Convert to lambda</description>
|
||||
</problem>
|
||||
</problems>
|
||||
Reference in New Issue
Block a user