KT-768 Code completion for extension functions
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
namespace Test
|
||||
|
||||
class Some() {
|
||||
fun methodName() {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
fun Some.first() {
|
||||
}
|
||||
|
||||
// EXIST: first
|
||||
@@ -0,0 +1,10 @@
|
||||
class Some() {
|
||||
fun methodName() {
|
||||
this.<caret>
|
||||
}
|
||||
}
|
||||
|
||||
fun Some.first() {
|
||||
}
|
||||
|
||||
// EXIST: first
|
||||
@@ -0,0 +1,11 @@
|
||||
fun Some.first() {
|
||||
}
|
||||
|
||||
class Some() {
|
||||
}
|
||||
|
||||
fun Some.second() {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// EXIST: first, second
|
||||
@@ -0,0 +1,11 @@
|
||||
fun Some.first() {
|
||||
}
|
||||
|
||||
class Some() {
|
||||
}
|
||||
|
||||
fun Some.second() {
|
||||
this.<caret>
|
||||
}
|
||||
|
||||
// EXIST: first, second
|
||||
@@ -0,0 +1,17 @@
|
||||
class SomeObject<T, U>() {
|
||||
var field : T? = null
|
||||
}
|
||||
|
||||
class A {}
|
||||
class C {}
|
||||
|
||||
fun <T: Comparable<T>, U> SomeObject<T, U>.compareTo(other : SomeObject<T, U>) : Int {
|
||||
return 0;
|
||||
}
|
||||
|
||||
fun some() {
|
||||
val test = SomeObject<A, A>
|
||||
test.<caret>
|
||||
}
|
||||
|
||||
// ABSENT: compareTo
|
||||
@@ -0,0 +1,11 @@
|
||||
fun Some.simpleKotlinExtension() {
|
||||
}
|
||||
|
||||
class Some() {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// ABSENT: simpleKotlinExtension
|
||||
@@ -0,0 +1,10 @@
|
||||
fun <T> java.lang.Iterable<T>.first() : T? {
|
||||
return this.iterator()?.next()
|
||||
}
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
val test = java.util.HashSet<Int>()
|
||||
test.<caret>
|
||||
}
|
||||
|
||||
// EXIST: first
|
||||
@@ -0,0 +1,12 @@
|
||||
fun <T> Some<T>.close() {
|
||||
}
|
||||
|
||||
class Some<T>() {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val s = Some<String>()
|
||||
s.<caret>
|
||||
}
|
||||
|
||||
// EXIST: close
|
||||
@@ -0,0 +1,12 @@
|
||||
fun Some.simpleKotlinExtension() {
|
||||
}
|
||||
|
||||
class Some() {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val s = Some()
|
||||
s.<caret>
|
||||
}
|
||||
|
||||
// EXIST: simpleKotlinExtension
|
||||
Reference in New Issue
Block a user