Intentions: function <-> property conversion
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
class A(val n: Int) {
|
||||
<spot>fun foo(): Int = n + 1</spot>
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val k = A(1).foo()
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class A(val n: Int) {
|
||||
<spot>val foo: Int get() = n + 1</spot>
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val k = A(1).foo
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention converts property to function
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user