Synthetic java properties are not always bold in completion and are not sorted as extensions
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
fun String?.forNullableString(){}
|
||||
fun Any?.forNullableAny(){}
|
||||
fun String.forString(){}
|
||||
fun Any.forAny(){}
|
||||
|
||||
fun foo(s: String?) {
|
||||
s.<caret>
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "forNullableString", attributes: "bold" }
|
||||
// EXIST: { lookupString: "forNullableAny", attributes: "" }
|
||||
// EXIST: { lookupString: "forString", attributes: "grayed" }
|
||||
// EXIST: { lookupString: "forAny", attributes: "grayed" }
|
||||
// EXIST: { lookupString: "compareTo", attributes: "grayed" }
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
fun String?.forNullableString(){}
|
||||
fun Any?.forNullableAny(){}
|
||||
fun String.forString(){}
|
||||
fun Any.forAny(){}
|
||||
|
||||
fun foo(o: Any?) {
|
||||
if (o is String) {
|
||||
o.<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "forNullableString", attributes: "" }
|
||||
// EXIST: { lookupString: "forNullableAny", attributes: "" }
|
||||
// EXIST: { lookupString: "forString", attributes: "bold" }
|
||||
// EXIST: { lookupString: "forAny", attributes: "" }
|
||||
// EXIST: { lookupString: "compareTo", attributes: "" }
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
trait T1 {
|
||||
fun inT1(){}
|
||||
}
|
||||
|
||||
trait T2 {
|
||||
fun inT2(){}
|
||||
}
|
||||
|
||||
fun T1.forT1(){}
|
||||
fun T2.forT2(){}
|
||||
fun T1?.forNullableT1(){}
|
||||
fun T2?.forNullableT2(){}
|
||||
fun Any.forAny(){}
|
||||
fun Any?.forNullableAny(){}
|
||||
|
||||
fun foo(o: T1?) {
|
||||
if (o is T2) {
|
||||
o.<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "inT1", attributes: "bold" }
|
||||
// EXIST: { lookupString: "inT2", attributes: "bold" }
|
||||
// EXIST: { lookupString: "hashCode", attributes: "" }
|
||||
// EXIST: { lookupString: "forT1", attributes: "bold" }
|
||||
// EXIST: { lookupString: "forT2", attributes: "bold" }
|
||||
// EXIST: { lookupString: "forNullableT1", attributes: "" }
|
||||
// EXIST: { lookupString: "forNullableT2", attributes: "" }
|
||||
// EXIST: { lookupString: "forAny", attributes: "" }
|
||||
// EXIST: { lookupString: "forNullableAny", attributes: "" }
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fun String.extFunForString(){}
|
||||
fun Any.extFunForAny(){}
|
||||
fun String?.extFunForStringNullable(){}
|
||||
|
||||
class C {
|
||||
fun Any.memberExtFunForAny(){}
|
||||
fun String?.memberExtFunForStringNullable(){}
|
||||
|
||||
fun foo() {
|
||||
"".<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "extFunForString", attributes: "bold" }
|
||||
// EXIST: { itemText: "extFunForAny", attributes: "" }
|
||||
// EXIST: { itemText: "extFunForStringNullable", attributes: "" }
|
||||
// EXIST: { itemText: "memberExtFunForAny", attributes: "" }
|
||||
// EXIST: { itemText: "memberExtFunForStringNullable", attributes: "" }
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
fun String.extFunForString(){}
|
||||
fun Any.extFunForAny(){}
|
||||
fun String?.extFunForStringNullable(){}
|
||||
|
||||
class C {
|
||||
fun foo(s: String?) {
|
||||
if (s != null) {
|
||||
s.<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "extFunForString", attributes: "bold" }
|
||||
// EXIST: { itemText: "extFunForAny", attributes: "" }
|
||||
// EXIST: { itemText: "extFunForStringNullable", attributes: "" }
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fun C.extFunForC(){}
|
||||
fun D.extFunForD(){}
|
||||
fun Any.extFunForAny(){}
|
||||
|
||||
open class C {
|
||||
fun foo() {
|
||||
if (this is D) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class D : C
|
||||
|
||||
// EXIST: { itemText: "extFunForD", attributes: "bold" }
|
||||
// EXIST: { itemText: "extFunForC", attributes: "" }
|
||||
// EXIST: { itemText: "extFunForAny", attributes: "" }
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
fun C.extFunForC(){}
|
||||
fun T.extFunForT(){}
|
||||
fun Any.extFunForAny(){}
|
||||
|
||||
open class C {
|
||||
fun foo() {
|
||||
if (this is T) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
trait T
|
||||
|
||||
// EXIST: { itemText: "extFunForT", attributes: "bold" }
|
||||
// EXIST: { itemText: "extFunForC", attributes: "bold" }
|
||||
// EXIST: { itemText: "extFunForAny", attributes: "" }
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
fun <T> List<T>.forListT(){}
|
||||
fun <T> Collection<T>.forCollectionT(){}
|
||||
fun <T> T.forT() {}
|
||||
|
||||
fun foo(list: List<String>) {
|
||||
list.<caret>
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "forListT", attributes: "bold" }
|
||||
// EXIST: { itemText: "forCollectionT", attributes: "" }
|
||||
// EXIST: { itemText: "forT", attributes: "" }
|
||||
@@ -0,0 +1,23 @@
|
||||
trait T {
|
||||
fun fromTrait(){}
|
||||
}
|
||||
|
||||
abstract class Base : T {
|
||||
fun fromBase(){}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
override fun fromTrait() { }
|
||||
|
||||
fun fromDerived(){}
|
||||
}
|
||||
|
||||
fun foo(d: Derived) {
|
||||
d.<caret>
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "fromTrait", attributes: "" }
|
||||
// EXIST: { itemText: "fromDerived", attributes: "bold" }
|
||||
// EXIST: { itemText: "fromBase", attributes: "" }
|
||||
// EXIST: { itemText: "hashCode", attributes: "" }
|
||||
// EXIST: { itemText: "equals", attributes: "" }
|
||||
@@ -0,0 +1,25 @@
|
||||
trait T {
|
||||
fun fromTrait(){}
|
||||
}
|
||||
|
||||
abstract class Base : T {
|
||||
fun fromBase(){}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
override fun fromTrait() { }
|
||||
|
||||
fun fromDerived(){}
|
||||
}
|
||||
|
||||
fun foo(o: Any) {
|
||||
if (o is Derived) {
|
||||
o.<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "fromTrait", attributes: "" }
|
||||
// EXIST: { itemText: "fromDerived", attributes: "bold" }
|
||||
// EXIST: { itemText: "fromBase", attributes: "" }
|
||||
// EXIST: { itemText: "hashCode", attributes: "" }
|
||||
// EXIST: { itemText: "equals", attributes: "" }
|
||||
@@ -0,0 +1,14 @@
|
||||
trait T {
|
||||
fun f(){}
|
||||
}
|
||||
|
||||
fun foo(o: T) {
|
||||
if (o is Runnable) {
|
||||
o.<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "run", attributes: "bold" }
|
||||
// EXIST: { itemText: "f", attributes: "bold" }
|
||||
// EXIST: { itemText: "hashCode", attributes: "" }
|
||||
// EXIST: { itemText: "equals", attributes: "" }
|
||||
@@ -0,0 +1,16 @@
|
||||
trait T {
|
||||
fun foo1(){}
|
||||
fun foo2(){}
|
||||
}
|
||||
|
||||
class B(worker: T) : T by worker {
|
||||
override fun foo1() { }
|
||||
}
|
||||
|
||||
fun foo(b: B) {
|
||||
b.<caret>
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "foo1", attributes: "" }
|
||||
// EXIST: { itemText: "foo2", attributes: "" }
|
||||
// EXIST: { itemText: "equals", attributes: "" }
|
||||
@@ -0,0 +1,27 @@
|
||||
fun globalFun(){}
|
||||
|
||||
trait T {
|
||||
fun fromTrait(){}
|
||||
}
|
||||
|
||||
abstract class Base : T {
|
||||
fun fromBase(){}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
override fun fromTrait() { }
|
||||
|
||||
fun fromDerived(){}
|
||||
|
||||
fun foo(d: Derived) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { itemText: "foo", attributes: "bold" }
|
||||
// EXIST: { itemText: "fromTrait", attributes: "" }
|
||||
// EXIST: { itemText: "fromDerived", attributes: "bold" }
|
||||
// EXIST: { itemText: "fromBase", attributes: "" }
|
||||
// EXIST: { itemText: "hashCode", attributes: "" }
|
||||
// EXIST: { itemText: "equals", attributes: "" }
|
||||
// EXIST: { itemText: "globalFun", attributes: "" }
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fun String.forString(){}
|
||||
|
||||
fun globalFun(){}
|
||||
|
||||
fun String?.foo() {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "globalFun", attributes: "" }
|
||||
// EXIST: { lookupString: "compareTo", attributes: "grayed" }
|
||||
// EXIST: { lookupString: "forString", attributes: "grayed" }
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
fun String.forString(){}
|
||||
fun Any.forAny(){}
|
||||
|
||||
fun <T> T.forT() {}
|
||||
|
||||
fun f(pair: Pair<out Any, out Any>) {
|
||||
if (pair.first !is String) return
|
||||
pair.first.<caret>
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "length", attributes: "grayed" }
|
||||
// EXIST: { lookupString: "hashCode", attributes: "bold" }
|
||||
// EXIST: { lookupString: "forString", attributes: "grayed" }
|
||||
// EXIST: { lookupString: "forAny", attributes: "bold" }
|
||||
// EXIST: { lookupString: "forT", attributes: "" }
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fun String?.forNullableString(){}
|
||||
fun Any?.forNullableAny(){}
|
||||
fun String.forString(){}
|
||||
fun Any.forAny(){}
|
||||
|
||||
fun foo(s: String?) {
|
||||
s?.<caret>
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "forNullableString", attributes: "" }
|
||||
// EXIST: { lookupString: "forNullableAny", attributes: "" }
|
||||
// EXIST: { lookupString: "forString", attributes: "bold" }
|
||||
// EXIST: { lookupString: "forAny", attributes: "" }
|
||||
// EXIST: { lookupString: "compareTo", attributes: "" }
|
||||
Reference in New Issue
Block a user