Explicit this inspection: suggest also for synthetic Java property
So #KT-22089 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
6b37e40f99
commit
4038d4d507
@@ -0,0 +1,11 @@
|
||||
public class Foo {
|
||||
private String s;
|
||||
|
||||
public String getS() {
|
||||
return s;
|
||||
}
|
||||
|
||||
public void setS(String s) {
|
||||
this.s = s;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test1() {
|
||||
Foo().apply {
|
||||
<caret>this.s = ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test1() {
|
||||
Foo().apply {
|
||||
<caret>s = ""
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
public class Foo {
|
||||
private boolean isB;
|
||||
|
||||
public boolean isB() {
|
||||
return isB;
|
||||
}
|
||||
|
||||
public void setB(boolean b) {
|
||||
isB = b;
|
||||
}
|
||||
}
|
||||
|
||||
public class Bar {
|
||||
private boolean isB;
|
||||
|
||||
public boolean isB() {
|
||||
return isB;
|
||||
}
|
||||
|
||||
public void setB(boolean b) {
|
||||
isB = b;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
// PROBLEM: none
|
||||
|
||||
fun test() {
|
||||
Foo().apply {
|
||||
Bar().run {
|
||||
<caret>this@apply.isB = true
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
public class Foo {
|
||||
private boolean isB;
|
||||
|
||||
public boolean isB() {
|
||||
return isB;
|
||||
}
|
||||
|
||||
public void setB(boolean b) {
|
||||
isB = b;
|
||||
}
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
// PROBLEM: none
|
||||
|
||||
fun test() {
|
||||
Foo().apply {
|
||||
Foo().run {
|
||||
<caret>this@apply.isB = true
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
public class Foo {
|
||||
private boolean isB;
|
||||
|
||||
public boolean isB() {
|
||||
return isB;
|
||||
}
|
||||
|
||||
public void setB(boolean b) {
|
||||
isB = b;
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
Foo().apply {
|
||||
<caret>this.isB = true
|
||||
}
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
Foo().apply {
|
||||
<caret>isB = true
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public class Foo {
|
||||
private boolean isB;
|
||||
|
||||
public boolean isB() {
|
||||
return isB;
|
||||
}
|
||||
|
||||
public void setB(boolean b) {
|
||||
isB = b;
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
// PROBLEM: none
|
||||
|
||||
fun test() {
|
||||
|
||||
val isB = true
|
||||
|
||||
Foo().apply {
|
||||
<caret>this.isB = true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user