Introduce "Function with = { ... }" inspection
#KT-17119 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
301b3aad06
commit
538a746df9
+2
@@ -0,0 +1,2 @@
|
||||
// FIX: Remove braces
|
||||
fun test(a: Int, b: Int) = <caret>{ a + b }
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
// FIX: Remove braces
|
||||
fun test(a: Int, b: Int) = a + b
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// FIX: Remove braces
|
||||
// WITH_RUNTIME
|
||||
fun test() = <caret>{ error("") }
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// FIX: Remove braces
|
||||
// WITH_RUNTIME
|
||||
fun test(): Nothing = error("")
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// FIX: Remove braces
|
||||
val test get() = <caret>{ "" }
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
// FIX: Remove braces
|
||||
val test get() = ""
|
||||
idea/testData/inspectionsLocal/functionWithLambdaExpressionBody/removeBraces/getterReturnsNothing.kt
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
// FIX: Remove braces
|
||||
// WITH_RUNTIME
|
||||
val test get() = <caret>{ error("") }
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// FIX: Remove braces
|
||||
// WITH_RUNTIME
|
||||
val test: Nothing get() = error("")
|
||||
Reference in New Issue
Block a user