KT-10631 Consider creating a synthetic property even when the setter returns 'this'

#KT-10631 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-01-19 15:27:41 +03:00
parent eef68e0a94
commit a1d760fc36
15 changed files with 88 additions and 24 deletions
@@ -0,0 +1,5 @@
interface JavaClass{
public int getSomething();
public JavaClass setSomething(int value);
}
@@ -0,0 +1,7 @@
fun foo(javaClass: JavaClass) {
javaClass.<caret>
}
// EXIST: { lookupString: "something", attributes: "bold" }
// EXIST: { lookupString: "setSomething", attributes: "bold" }
// ABSENT: getSomething
@@ -353,6 +353,12 @@ public class MultiFileJvmBasicCompletionTestGenerated extends AbstractMultiFileJ
doTest(fileName);
}
@TestMetadata("SyntheticExtensionNonVoidSetter")
public void testSyntheticExtensionNonVoidSetter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/SyntheticExtensionNonVoidSetter/");
doTest(fileName);
}
@TestMetadata("TopLevelFunction")
public void testTopLevelFunction() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/TopLevelFunction/");