Fix completion for private_to_this.

This commit is contained in:
Stanislav Erokhin
2014-10-31 14:07:32 +03:00
parent f9afdf7540
commit d334f3b31c
18 changed files with 320 additions and 61 deletions
@@ -0,0 +1,15 @@
class Some() {
public val testPublic = 12
protected val testProtected = 12
private val testPrivate = 12
val testPackage = 12
}
fun test() {
Some().<caret>
}
// INVOCATION_COUNT: 1
// EXIST: testPublic, testPackage
// ABSENT: testPrivate, testProtected
@@ -0,0 +1,13 @@
class Some() {
public val testPublic : Int = 12
protected val testProtected : Int = 12
private val testPrivate = 12
val testPackage = 12
}
fun test() {
Some().<caret>
}
// INVOCATION_COUNT: 2
// EXIST: testPublic, testProtected, testPrivate, testPackage
@@ -0,0 +1,16 @@
class Some() {
public val testPublic = 12
protected val testProtected = 12
private val testPrivate = 12
val testPackage = 12
}
class SomeSubclass : Some() {
fun test() {
<caret>
}
}
// INVOCATION_COUNT: 1
// EXIST: testPublic, testProtected, testPackage
// ABSENT: testPrivate
@@ -0,0 +1,15 @@
class Some() {
public val testPublic = 12
protected val testProtected = 12
private val testPrivate = 12
val testPackage = 12
}
class SomeSubclass : Some() {
fun test() {
<caret>
}
}
// INVOCATION_COUNT: 2
// EXIST: testPublic, testProtected, testPackage, testPrivate
@@ -0,0 +1,13 @@
class A<in I> {
private val bar: I
private fun foo(): I = null!!
fun test() {
<caret>
}
}
// INVOCATION_COUNT: 1
// EXIST: bar, foo
@@ -0,0 +1,12 @@
class A<in I> {
private val bar: I
private fun foo(): I = null!!
{
<caret>
}
}
// INVOCATION_COUNT: 1
// EXIST: bar, foo
@@ -0,0 +1,12 @@
class A<in I> {
private val bar: I
private fun foo(): I = null!!
{
this.<caret>
}
}
// INVOCATION_COUNT: 1
// EXIST: bar, foo
@@ -0,0 +1,15 @@
class A<in I> {
private val bar: I
private fun foo(): I = null!!
fun test() {
with(A()) {
<caret>
}
}
}
// INVOCATION_COUNT: 1
// EXIST: bar, foo
@@ -0,0 +1,13 @@
class A<in I> {
private val bar: I
private fun foo(): I = null!!
fun test(a: A<Int>) {
a.<caret>
}
}
// INVOCATION_COUNT: 1
// ABSENT: bar, foo
@@ -0,0 +1,13 @@
class A<in I> {
private val bar: I
private fun foo(): I = null!!
fun test(a: A<Int>) {
a.<caret>
}
}
// INVOCATION_COUNT: 2
// EXIST: bar, foo
@@ -0,0 +1,15 @@
class A<in I> {
private val bar: I
private fun foo(): I = null!!
fun test() {
with(A()) {
this@A.<caret>
}
}
}
// INVOCATION_COUNT: 1
// EXIST: bar, foo
@@ -0,0 +1,15 @@
class A<in I> {
private val bar: I
private fun foo(): I = null!!
fun test() {
with(A()) {
this.<caret>
}
}
}
// INVOCATION_COUNT: 1
// ABSENT: bar, foo