Use property access syntax: fix problem text and highlight range
#KT-30910 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
bf5b559923
commit
864f99782e
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.intentions.UsePropertyAccessSyntaxInspection
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// PROBLEM: none
|
||||
// WITH_RUNTIME
|
||||
import java.io.File
|
||||
|
||||
fun foo(file: File) {
|
||||
file.getAbsolutePath(<caret>)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// PROBLEM: "Use of getter method instead of property access syntax"
|
||||
// WITH_RUNTIME
|
||||
import java.io.File
|
||||
|
||||
fun foo(file: File) {
|
||||
file.getAbsolutePath<caret>()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// PROBLEM: "Use of getter method instead of property access syntax"
|
||||
// WITH_RUNTIME
|
||||
import java.io.File
|
||||
|
||||
fun foo(file: File) {
|
||||
file.absolutePath
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// PROBLEM: "Use of setter method instead of property access syntax"
|
||||
// WITH_RUNTIME
|
||||
fun foo(thread: Thread) {
|
||||
thread.setName<caret>("name")
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// PROBLEM: "Use of setter method instead of property access syntax"
|
||||
// WITH_RUNTIME
|
||||
fun foo(thread: Thread) {
|
||||
thread.name = "name"
|
||||
}
|
||||
Reference in New Issue
Block a user