Quickfix for "Expression cannot be invoked as a function" with no arguments to remove parentheses
#KT-10825 Fixed
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
// "Change to property access" "true"
|
||||
|
||||
fun x() {
|
||||
val y = (1+2<caret>)()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Change to property access" "true"
|
||||
|
||||
fun x() {
|
||||
val y = (1+2)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Change to property access" "true"
|
||||
class A(val ff: String)
|
||||
|
||||
fun x() {
|
||||
val y = A("").f<caret>f()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Change to property access" "true"
|
||||
class A(val ff: String)
|
||||
|
||||
fun x() {
|
||||
val y = A("").ff
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Change to property access" "false"
|
||||
// ERROR: Expression 'fd' of type 'kotlin.String' cannot be invoked as a function. The function invoke() is not found
|
||||
class A(val fd: String)
|
||||
|
||||
fun x() {
|
||||
val y = A("").f<caret>d("")
|
||||
}
|
||||
Reference in New Issue
Block a user