remove support for 'trait' keyword
This commit is contained in:
@@ -41,8 +41,7 @@ open class KeywordLookupObject
|
||||
|
||||
object KeywordCompletion {
|
||||
private val NON_ACTUAL_KEYWORDS = setOf(CAPITALIZED_THIS_KEYWORD,
|
||||
TYPE_ALIAS_KEYWORD,
|
||||
TRAIT_KEYWORD)
|
||||
TYPE_ALIAS_KEYWORD)
|
||||
private val ALL_KEYWORDS = (KEYWORDS.getTypes() + SOFT_KEYWORDS.getTypes())
|
||||
.filter { it !in NON_ACTUAL_KEYWORDS }
|
||||
.map { it as JetKeywordToken }
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ fun foo(p: Iterable<D>) {
|
||||
p.filter { it.<caret> }
|
||||
}
|
||||
|
||||
trait D {
|
||||
interface D {
|
||||
fun bar()
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
trait T1 {
|
||||
interface T1 {
|
||||
fun inT1(){}
|
||||
}
|
||||
|
||||
trait T2 {
|
||||
interface T2 {
|
||||
fun inT2(){}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ open class C {
|
||||
}
|
||||
}
|
||||
|
||||
trait T
|
||||
interface T
|
||||
|
||||
// EXIST: { itemText: "extFunForT", attributes: "bold" }
|
||||
// EXIST: { itemText: "extFunForC", attributes: "bold" }
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
fun fromTrait(){}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
fun fromTrait(){}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
fun f(){}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
fun foo1(){}
|
||||
fun foo2(){}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
fun globalFun(){}
|
||||
|
||||
trait T {
|
||||
interface T {
|
||||
fun fromTrait(){}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait I<T>
|
||||
interface I<T>
|
||||
|
||||
fun <E, T : I<E>> T.ext() : T = this
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
trait A {
|
||||
interface A {
|
||||
fun foo(): Int
|
||||
}
|
||||
|
||||
trait B: A {
|
||||
interface B: A {
|
||||
override fun foo(): Int
|
||||
override fun foo1(): Int
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Expr
|
||||
interface Expr
|
||||
class Num(val value : Int) : Expr
|
||||
|
||||
fun eval(e : Expr) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Expr {
|
||||
interface Expr {
|
||||
public fun testThis() {
|
||||
if (this is Num) {
|
||||
this.<caret>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Expr
|
||||
interface Expr
|
||||
class Sum(val left : Expr, val right : Expr) : Expr
|
||||
|
||||
fun evalWhen(e : Expr) : Int = when (e) {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait Trait<T>
|
||||
interface Trait<T>
|
||||
|
||||
fun<T> Trait<T>.extension(t: T): T = t
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package first
|
||||
|
||||
trait TestedTrait() {
|
||||
interface TestedTrait() {
|
||||
}
|
||||
|
||||
fun firstFun() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait X {
|
||||
interface X {
|
||||
open fun fn() {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait X {
|
||||
interface X {
|
||||
open fun fn() {}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
public trait Comparator<T> {
|
||||
public interface Comparator<T> {
|
||||
public fun compare(var1: T, var2: T): Int
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Foo
|
||||
interface Foo
|
||||
|
||||
var a : Foo = <caret>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Foo
|
||||
interface Foo
|
||||
|
||||
var a : Foo = object: Foo {<caret>}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait Foo
|
||||
interface Foo
|
||||
|
||||
fun foo(f: Foo, i: Int){}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Foo
|
||||
interface Foo
|
||||
|
||||
fun foo(f: Foo, i: Int){}
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ fun test() {
|
||||
registerHandler(<caret>)
|
||||
}
|
||||
|
||||
trait Message
|
||||
interface Message
|
||||
|
||||
trait Handler<E> {
|
||||
interface Handler<E> {
|
||||
fun handle(e: E)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -8,9 +8,9 @@ fun test() {
|
||||
})
|
||||
}
|
||||
|
||||
trait Message
|
||||
interface Message
|
||||
|
||||
trait Handler<E> {
|
||||
interface Handler<E> {
|
||||
fun handle(e: E)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
class `class`<T>
|
||||
|
||||
trait `trait`
|
||||
interface `interface`
|
||||
|
||||
fun foo(p: `class`<`trait`>){}
|
||||
fun foo(p: `class`<`interface`>){}
|
||||
|
||||
fun f(){
|
||||
foo(<caret>)
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
class `class`<T>
|
||||
|
||||
trait `trait`
|
||||
interface `interface`
|
||||
|
||||
fun foo(p: `class`<`trait`>){}
|
||||
fun foo(p: `class`<`interface`>){}
|
||||
|
||||
fun f(){
|
||||
foo(`class`())<caret>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
trait X
|
||||
trait Y
|
||||
interface X
|
||||
interface Y
|
||||
|
||||
fun X.iterator(): Y
|
||||
fun Y.next(): Int
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
trait X
|
||||
trait Y
|
||||
interface X
|
||||
interface Y
|
||||
|
||||
fun X.iterator(): Y
|
||||
fun Y.next(): Int
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
trait X
|
||||
trait Y
|
||||
interface X
|
||||
interface Y
|
||||
|
||||
fun X.iterator(): Y
|
||||
fun Y.next(): Int
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
trait X
|
||||
trait Y
|
||||
interface X
|
||||
interface Y
|
||||
|
||||
fun X.iterator(): Y
|
||||
fun Y.next(): Int
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package p
|
||||
|
||||
class Outer {
|
||||
trait T {
|
||||
interface T {
|
||||
object Null : T { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package p
|
||||
|
||||
class Outer {
|
||||
trait T {
|
||||
interface T {
|
||||
object Null : T { }
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ public class LibClass {
|
||||
public val nested: Nested = Nested()
|
||||
}
|
||||
|
||||
public trait LibTrait {
|
||||
public interface LibTrait {
|
||||
public fun foo() {
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait Foo{
|
||||
interface Foo{
|
||||
public fun foo() : Foo
|
||||
public fun s() : String
|
||||
public val prop : String
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
fun fromTrait() = ""
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait I
|
||||
interface I
|
||||
|
||||
object O : I
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package p
|
||||
|
||||
trait T {
|
||||
interface T {
|
||||
object Null : T { }
|
||||
|
||||
object Other {}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait Foo{
|
||||
interface Foo{
|
||||
fun foo1() : String
|
||||
fun foo2() : Object
|
||||
val prop : String
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Foo
|
||||
interface Foo
|
||||
|
||||
var a : Foo = <caret>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Foo
|
||||
interface Foo
|
||||
|
||||
var a : Foo = o<caret>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait T
|
||||
interface T
|
||||
|
||||
class C {
|
||||
inner class Inner1(s: String) : T
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
trait X
|
||||
trait Y
|
||||
interface X
|
||||
interface Y
|
||||
|
||||
fun X.iterator(): Y
|
||||
fun Y.next(): Int
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
trait X
|
||||
trait Y: X
|
||||
trait Z
|
||||
interface X
|
||||
interface Y: X
|
||||
interface Z
|
||||
|
||||
fun foo(p1: Collection<X>, p2: Collection<Y>, p3: Collection<Z>, p4: Collection<X?>) {
|
||||
for (i: X in <caret>)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import java.util.ArrayList
|
||||
|
||||
trait A
|
||||
trait B : A
|
||||
trait C
|
||||
interface A
|
||||
interface B : A
|
||||
interface C
|
||||
|
||||
fun foo(a: A, cA: Collection<A>, cB: Collection<B>, cC: Collection<C>, cAny: Collection<Any>,
|
||||
lA: List<A>, lb: List<B>, lC: List<C>, lAny: List<Any>,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
trait A
|
||||
trait B : A
|
||||
trait C
|
||||
interface A
|
||||
interface B : A
|
||||
interface C
|
||||
|
||||
fun foo(a: A){}
|
||||
fun foo(c: C){}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
trait A
|
||||
trait B : A
|
||||
trait C
|
||||
interface A
|
||||
interface B : A
|
||||
interface C
|
||||
|
||||
fun foo(a: A?){}
|
||||
fun foo(c: C?){}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
trait A
|
||||
trait B : A
|
||||
trait C
|
||||
interface A
|
||||
interface B : A
|
||||
interface C
|
||||
|
||||
fun foo(a: A){}
|
||||
fun foo(c: C){}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
trait A
|
||||
trait B : A
|
||||
trait C
|
||||
interface A
|
||||
interface B : A
|
||||
interface C
|
||||
|
||||
fun foo(a: A){}
|
||||
fun foo(c: C){}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
trait X
|
||||
trait Y : X
|
||||
trait Z
|
||||
interface X
|
||||
interface Y : X
|
||||
interface Z
|
||||
|
||||
fun X.contains(s: String): Boolean
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
trait X {
|
||||
interface X {
|
||||
fun contains(s: String): Boolean
|
||||
}
|
||||
|
||||
trait Y {
|
||||
interface Y {
|
||||
fun contains(i: Int): Boolean
|
||||
}
|
||||
|
||||
trait Z {
|
||||
interface Z {
|
||||
fun contains(o: Any): Boolean
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
trait X<T> {
|
||||
interface X<T> {
|
||||
fun contains(t: T): Boolean
|
||||
}
|
||||
|
||||
trait A {
|
||||
interface A {
|
||||
fun<T> createX(t: T): X<T>
|
||||
|
||||
fun foo(s: String) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
trait X<T>
|
||||
interface X<T>
|
||||
|
||||
fun<T> X<T>.contains(t: T): Boolean
|
||||
|
||||
trait A {
|
||||
interface A {
|
||||
fun<T> createX(t: T): X<T>
|
||||
|
||||
fun foo(s: String) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait X {
|
||||
interface X {
|
||||
fun contains(s: String): Boolean?
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait T
|
||||
interface T
|
||||
|
||||
open class A : T
|
||||
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
public trait Comparator<T> {
|
||||
public interface Comparator<T> {
|
||||
public fun compare(var1: T, var2: T): Int
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package p
|
||||
|
||||
trait I1
|
||||
trait I2
|
||||
trait I3
|
||||
interface I1
|
||||
interface I2
|
||||
interface I3
|
||||
|
||||
trait KotlinTrait<T1, T2>
|
||||
interface KotlinTrait<T1, T2>
|
||||
|
||||
open class KotlinInheritor1<T> : KotlinTrait<T, I2>
|
||||
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package p
|
||||
|
||||
trait I1
|
||||
trait I2
|
||||
trait I3
|
||||
interface I1
|
||||
interface I2
|
||||
interface I3
|
||||
|
||||
trait KotlinTrait<T1, T2>
|
||||
interface KotlinTrait<T1, T2>
|
||||
|
||||
class KotlinInheritor<T> : KotlinTrait<T, T>
|
||||
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package p
|
||||
|
||||
trait I1
|
||||
trait I2
|
||||
trait I3
|
||||
interface I1
|
||||
interface I2
|
||||
interface I3
|
||||
|
||||
trait KotlinTrait<T1, T2>
|
||||
interface KotlinTrait<T1, T2>
|
||||
|
||||
class KotlinInheritor<T> : KotlinTrait<T, T>
|
||||
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
package p
|
||||
|
||||
trait I1<T>
|
||||
trait I2
|
||||
interface I1<T>
|
||||
interface I2
|
||||
|
||||
trait KotlinTrait<T>
|
||||
interface KotlinTrait<T>
|
||||
|
||||
class KotlinInheritor<T> : KotlinTrait<I1<T>>
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait T
|
||||
interface T
|
||||
|
||||
class C : A()
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package p2
|
||||
|
||||
trait KotlinTrait
|
||||
interface KotlinTrait
|
||||
|
||||
open class KotlinInheritor1 : KotlinTrait
|
||||
|
||||
|
||||
Vendored
+3
-3
@@ -1,9 +1,9 @@
|
||||
class X
|
||||
class Y
|
||||
|
||||
trait T1
|
||||
trait T2<T>
|
||||
trait T3<T>
|
||||
interface T1
|
||||
interface T2<T>
|
||||
interface T3<T>
|
||||
|
||||
class C1 : T1
|
||||
class C2<T> : T2<T>, T3<T>
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait X
|
||||
interface X
|
||||
|
||||
fun foo(x: X) {
|
||||
JavaClass.search(<caret>)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait T
|
||||
interface T
|
||||
|
||||
object OO : T
|
||||
|
||||
|
||||
Reference in New Issue
Block a user