Introduce "use expression body" inspection #KT-16063 Fixed
Converted from the relevant intention Reported cases: one-liners, whens Also, more exact caret detection in local inspection tests
This commit is contained in:
committed by
Mikhail Glukhikh
parent
fe9d3f16d3
commit
d08b18f5f8
@@ -2,7 +2,6 @@
|
||||
// "Import" "false"
|
||||
// ERROR: Too many arguments for public final fun foo(): Unit defined in main.X
|
||||
// ACTION: Add parameter to function 'foo'
|
||||
// ACTION: Convert to expression body
|
||||
// ACTION: Create extension function 'X.foo'
|
||||
// ACTION: Create member function 'X.foo'
|
||||
|
||||
|
||||
-1
@@ -2,7 +2,6 @@
|
||||
// "Import" "false"
|
||||
// ERROR: Too many arguments for public final fun foo(): Unit defined in main.X
|
||||
// ACTION: Add parameter to function 'foo'
|
||||
// ACTION: Convert to expression body
|
||||
// ACTION: Create extension function 'X.foo'
|
||||
// ACTION: Create member function 'X.foo'
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// ERROR: Type mismatch: inferred type is Int but String was expected
|
||||
// ACTION: Add 'toString()' call
|
||||
// ACTION: Change parameter 'p' type of function 'main.X.foo' to 'Int'
|
||||
// ACTION: Convert to expression body
|
||||
// ACTION: Create function 'foo'
|
||||
|
||||
package main
|
||||
|
||||
-1
@@ -2,7 +2,6 @@
|
||||
// "Import" "false"
|
||||
// ERROR: Too many arguments for public final fun foo(): Unit defined in main.X
|
||||
// ACTION: Add parameter to function 'foo'
|
||||
// ACTION: Convert to expression body
|
||||
// ACTION: Create extension function 'X.foo'
|
||||
// ACTION: Create member function 'X.foo'
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// "Import" "false"
|
||||
// ERROR: Unresolved reference: Some
|
||||
// ACTION: Convert to expression body
|
||||
// ACTION: Create function 'Some'
|
||||
// ACTION: Rename reference
|
||||
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
// "Import" "false"
|
||||
// ERROR: Unresolved reference: Some
|
||||
// ACTION: Convert to expression body
|
||||
// ACTION: Create function 'Some'
|
||||
// ACTION: Rename reference
|
||||
|
||||
|
||||
Reference in New Issue
Block a user