Join with assignment: place the result at the assignment
#KT-21172 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
8078c5da40
commit
40dd229021
@@ -0,0 +1,9 @@
|
||||
fun test(repo: Repository, commitMessage: String) {
|
||||
val hash: String<caret>
|
||||
repo.git("add --verbose .")
|
||||
hash = repo.git("commit -m $commitMessage")
|
||||
}
|
||||
|
||||
class Repository {
|
||||
fun git(s: String) = ""
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fun test(repo: Repository, commitMessage: String) {
|
||||
repo.git("add --verbose .")
|
||||
val hash<selection>: String</selection><caret> = repo.git("commit -m $commitMessage")
|
||||
}
|
||||
|
||||
class Repository {
|
||||
fun git(s: String) = ""
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
constructor() {
|
||||
val foo: String<caret>
|
||||
bar()
|
||||
foo = ""
|
||||
}
|
||||
|
||||
fun bar() {}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class A {
|
||||
constructor() {
|
||||
bar()
|
||||
val foo<selection>: String</selection><caret> = ""
|
||||
}
|
||||
|
||||
fun bar() {}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
init {
|
||||
val foo: String<caret>
|
||||
bar()
|
||||
foo = ""
|
||||
}
|
||||
|
||||
fun bar() {}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class A {
|
||||
init {
|
||||
bar()
|
||||
val foo<selection>: String</selection><caret> = ""
|
||||
}
|
||||
|
||||
fun bar() {}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
constructor() {
|
||||
a = 1
|
||||
}
|
||||
|
||||
val a<caret>: Int
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
constructor()
|
||||
|
||||
val a<selection>: Int</selection><caret> = 1
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// DISABLE-ERRORS
|
||||
class A(i: Int, j: Int) {
|
||||
constructor(i: Int) : this(i, 2) {
|
||||
a = 1
|
||||
}
|
||||
|
||||
val a<caret>: Int
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// DISABLE-ERRORS
|
||||
class A(i: Int, j: Int) {
|
||||
constructor(i: Int) : this(i, 2)
|
||||
|
||||
val a<selection>: Int</selection><caret> = 1
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
class A {
|
||||
constructor() {
|
||||
a = 1
|
||||
foo()
|
||||
}
|
||||
|
||||
val a<caret>: Int
|
||||
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
+3
@@ -1,6 +1,9 @@
|
||||
class A {
|
||||
constructor() {
|
||||
foo()
|
||||
}
|
||||
|
||||
val a<selection>: Int</selection><caret> = 1
|
||||
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user