IDE testdata: s/trait/interface
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
trait Hi {
|
||||
interface Hi {
|
||||
fun foo(): Int
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait <lineMarker></lineMarker>TestTrait {
|
||||
interface <lineMarker></lineMarker>TestTrait {
|
||||
fun <lineMarker></lineMarker>test()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
trait <lineMarker></lineMarker>A {
|
||||
interface <lineMarker></lineMarker>A {
|
||||
fun <lineMarker></lineMarker>f() {
|
||||
}
|
||||
}
|
||||
|
||||
trait <lineMarker></lineMarker>B : A
|
||||
interface <lineMarker></lineMarker>B : A
|
||||
|
||||
open class <lineMarker></lineMarker>C(b : B) : B by b, A {
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
trait <lineMarker></lineMarker>A {
|
||||
interface <lineMarker></lineMarker>A {
|
||||
val <lineMarker></lineMarker>f: Int
|
||||
get() = 3
|
||||
}
|
||||
|
||||
trait <lineMarker></lineMarker>B : A
|
||||
interface <lineMarker></lineMarker>B : A
|
||||
|
||||
open class <lineMarker></lineMarker>C(b : B) : B by b, A {
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package sample
|
||||
|
||||
trait <lineMarker descr="*"></lineMarker>S<T> {
|
||||
interface <lineMarker descr="*"></lineMarker>S<T> {
|
||||
fun <lineMarker descr="<html><body>Is implemented in <br> sample.S2</body></html>"></lineMarker>foo(t: T): T
|
||||
|
||||
val <lineMarker descr="<html><body>Is implemented in <br/> sample.S2</body></html>"></lineMarker>some: T? get
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
trait <lineMarker></lineMarker>A {
|
||||
interface <lineMarker></lineMarker>A {
|
||||
fun <lineMarker></lineMarker>f() {}
|
||||
}
|
||||
|
||||
trait <lineMarker></lineMarker>B : A
|
||||
interface <lineMarker></lineMarker>B : A
|
||||
|
||||
trait <lineMarker></lineMarker>C : B, A
|
||||
interface <lineMarker></lineMarker>C : B, A
|
||||
|
||||
class SomeClass() : C {
|
||||
override fun <lineMarker descr="Overrides function in 'A'"></lineMarker>f() {}
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
trait <lineMarker></lineMarker>A {
|
||||
interface <lineMarker></lineMarker>A {
|
||||
fun <lineMarker></lineMarker><lineMarker></lineMarker>f() {}
|
||||
}
|
||||
|
||||
trait <lineMarker></lineMarker>B : A {
|
||||
interface <lineMarker></lineMarker>B : A {
|
||||
override fun <lineMarker></lineMarker>f() {}
|
||||
}
|
||||
|
||||
trait <lineMarker></lineMarker>C : B, A
|
||||
interface <lineMarker></lineMarker>C : B, A
|
||||
|
||||
class SomeClass() : C {
|
||||
override fun <lineMarker descr="Overrides function in 'B'"></lineMarker>f() {}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
trait <lineMarker></lineMarker>A {
|
||||
interface <lineMarker></lineMarker>A {
|
||||
val <lineMarker></lineMarker>f: Int
|
||||
get() = 2
|
||||
}
|
||||
|
||||
trait <lineMarker></lineMarker>B : A
|
||||
interface <lineMarker></lineMarker>B : A
|
||||
|
||||
trait <lineMarker></lineMarker>C : B, A
|
||||
interface <lineMarker></lineMarker>C : B, A
|
||||
|
||||
class SomeClass() : C {
|
||||
override val <lineMarker descr="Overrides property in 'A'"></lineMarker>f: Int = 4
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait <lineMarker descr="*"></lineMarker>A {
|
||||
interface <lineMarker descr="*"></lineMarker>A {
|
||||
override fun <lineMarker descr="<html><body>Is implemented in <br> C</body></html>"><lineMarker descr="*"></lineMarker></lineMarker>toString() = "A"
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait <lineMarker descr="*"></lineMarker>A {
|
||||
interface <lineMarker descr="*"></lineMarker>A {
|
||||
fun <lineMarker descr="<html><body>Is implemented in <br> C</body></html>"></lineMarker>foo(): String = "A"
|
||||
|
||||
// TODO: B shoudn't be mentioned
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
trait <lineMarker></lineMarker>A1 {
|
||||
interface <lineMarker></lineMarker>A1 {
|
||||
fun <lineMarker></lineMarker>foo()
|
||||
}
|
||||
|
||||
trait <lineMarker></lineMarker>B1 {
|
||||
interface <lineMarker></lineMarker>B1 {
|
||||
fun <lineMarker></lineMarker>foo()
|
||||
}
|
||||
|
||||
@@ -17,6 +17,6 @@ NavigateToSeveralSuperElements.kt
|
||||
fun <1>foo()
|
||||
}
|
||||
|
||||
trait B1 {
|
||||
interface B1 {
|
||||
fun <2>foo()
|
||||
*/
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
trait <lineMarker descr="*"></lineMarker>SkipSupport {
|
||||
interface <lineMarker descr="*"></lineMarker>SkipSupport {
|
||||
fun <lineMarker descr="<html><body>Is implemented in <br> SkipSupportWithDefaults</body></html>"></lineMarker>skip()
|
||||
}
|
||||
|
||||
public trait <lineMarker descr="*"></lineMarker>SkipSupportWithDefaults : SkipSupport {
|
||||
public interface <lineMarker descr="*"></lineMarker>SkipSupportWithDefaults : SkipSupport {
|
||||
override fun <lineMarker descr="Implements function in 'SkipSupport'"></lineMarker>skip() {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait <lineMarker descr="*"></lineMarker>A {
|
||||
interface <lineMarker descr="*"></lineMarker>A {
|
||||
fun <lineMarker descr="<html><body>Is implemented in <br> B</body></html>"></lineMarker>foo(str: String)
|
||||
fun <lineMarker descr="<html><body>Is implemented in <br> B</body></html>"></lineMarker>foo()
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
trait <lineMarker descr="*"></lineMarker>SkipSupport {
|
||||
interface <lineMarker descr="*"></lineMarker>SkipSupport {
|
||||
fun <lineMarker descr="<html><body>Is implemented in <br> SkipSupportImpl<br> SkipSupportWithDefaults</body></html>"></lineMarker>skip(why: String)
|
||||
fun <lineMarker descr="<html><body>Is implemented in <br> SkipSupportWithDefaults</body></html>"></lineMarker>skip()
|
||||
}
|
||||
|
||||
public trait <lineMarker descr="*"></lineMarker>SkipSupportWithDefaults : SkipSupport {
|
||||
public interface <lineMarker descr="*"></lineMarker>SkipSupportWithDefaults : SkipSupport {
|
||||
// TODO: should be "Is overriden in SkipSupportImpl"
|
||||
override fun <lineMarker descr="<html><body>Is implemented in <br> SkipSupportImpl</body></html>"><lineMarker descr="Implements function in 'SkipSupport'"></lineMarker></lineMarker>skip(why: String) {}
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// TODO: Declarations have no implementation and should be considered as "overloaded"
|
||||
trait <lineMarker descr="*"></lineMarker>First {
|
||||
interface <lineMarker descr="*"></lineMarker>First {
|
||||
val <lineMarker descr="<html><body>Is implemented in <br/> Second</body></html>"></lineMarker>some: Int
|
||||
var <lineMarker descr="<html><body>Is implemented in <br/> Second</body></html>"></lineMarker>other: String
|
||||
get
|
||||
@@ -8,7 +8,7 @@ trait <lineMarker descr="*"></lineMarker>First {
|
||||
fun <lineMarker descr="<html><body>Is implemented in <br> Second</body></html>"></lineMarker>foo()
|
||||
}
|
||||
|
||||
trait Second : First {
|
||||
interface Second : First {
|
||||
override val <lineMarker descr="Overrides property in 'First'"></lineMarker>some: Int
|
||||
override var <lineMarker descr="Overrides property in 'First'"></lineMarker>other: String
|
||||
override fun <lineMarker descr="Overrides function in 'First'"></lineMarker>foo()
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
trait <lineMarker descr="*"></lineMarker>SkipSupport {
|
||||
interface <lineMarker descr="*"></lineMarker>SkipSupport {
|
||||
fun <lineMarker descr="<html><body>Is implemented in <br> SkipSupportImpl1<br> SkipSupportWithDefaults</body></html>"></lineMarker>skip()
|
||||
}
|
||||
|
||||
public trait <lineMarker descr="*"></lineMarker>SkipSupportWithDefaults : SkipSupport {
|
||||
public interface <lineMarker descr="*"></lineMarker>SkipSupportWithDefaults : SkipSupport {
|
||||
override fun <lineMarker descr="<html><body>Is implemented in <br> SkipSupportImpl1</body></html>"><lineMarker descr="Implements function in 'SkipSupport'"></lineMarker></lineMarker>skip() {}
|
||||
}
|
||||
|
||||
public trait SkipSupportImpl1 : SkipSupportWithDefaults {
|
||||
public interface SkipSupportImpl1 : SkipSupportWithDefaults {
|
||||
override fun <lineMarker descr="Overrides function in 'SkipSupportWithDefaults'"></lineMarker>skip() {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public trait Foo {
|
||||
public interface Foo {
|
||||
override fun <lineMarker descr="Overrides function in 'Any'"></lineMarker>toString() = "str"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait <lineMarker></lineMarker>A {
|
||||
interface <lineMarker></lineMarker>A {
|
||||
fun <lineMarker></lineMarker>a(){
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FALSE
|
||||
trait Some
|
||||
interface Some
|
||||
|
||||
fun test() {
|
||||
val foo = object: Some {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FALSE
|
||||
trait Some
|
||||
interface Some
|
||||
|
||||
fun test() {
|
||||
object : Some {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// TRUE
|
||||
|
||||
// Problem with lazy initialization of nullable properties
|
||||
trait Some
|
||||
interface Some
|
||||
|
||||
val test: Some = object: Some {
|
||||
fun test() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// TRUE
|
||||
|
||||
// Problem with lazy initialization of nullable properties
|
||||
trait Some
|
||||
interface Some
|
||||
|
||||
val test: Some? = object: Some {
|
||||
fun test() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
fun foo(a:Int = 1)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
fun foo(a:Int = 1)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
fun foo()
|
||||
fun bar()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
fun foo()
|
||||
fun bar()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// From KT-1254
|
||||
trait T {
|
||||
interface T {
|
||||
fun Foo() : (String) -> Unit
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// From KT-1254
|
||||
trait T {
|
||||
interface T {
|
||||
fun Foo() : (String) -> Unit
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package foo
|
||||
|
||||
trait KotlinTrait {
|
||||
interface KotlinTrait {
|
||||
fun bar(price : String?)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// From KT-1254
|
||||
trait T {
|
||||
interface T {
|
||||
fun Foo() : (String) -> Unit
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// From KT-1254
|
||||
trait T {
|
||||
interface T {
|
||||
fun Foo() : (String) -> Unit
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// From KT-1648
|
||||
trait A {
|
||||
interface A {
|
||||
val method:() -> Unit?
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// From KT-1648
|
||||
trait A {
|
||||
interface A {
|
||||
val method:() -> Unit?
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Trait {
|
||||
interface Trait {
|
||||
fun <A, B : Runnable, E : Map.Entry<A, B>> foo() where B : Cloneable, B : Comparable<B>;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Trait {
|
||||
interface Trait {
|
||||
fun <A, B : Runnable, E : Map.Entry<A, B>> foo() where B : Cloneable, B : Comparable<B>;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package something
|
||||
|
||||
trait Some<T> {
|
||||
interface Some<T> {
|
||||
fun someFoo()
|
||||
fun someOtherFoo() : Int
|
||||
fun someGenericFoo() : T
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package something
|
||||
|
||||
trait Some<T> {
|
||||
interface Some<T> {
|
||||
fun someFoo()
|
||||
fun someOtherFoo() : Int
|
||||
fun someGenericFoo() : T
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait G<T> {
|
||||
interface G<T> {
|
||||
fun foo(t : T) : T
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait G<T> {
|
||||
interface G<T> {
|
||||
fun foo(t : T) : T
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ open class A() {
|
||||
public open fun publicFun() {}
|
||||
}
|
||||
|
||||
trait B {
|
||||
interface B {
|
||||
protected open val protectedProperty : Int
|
||||
internal open val internalProperty : Int
|
||||
public open val publicProperty : Int
|
||||
|
||||
@@ -4,7 +4,7 @@ open class A() {
|
||||
public open fun publicFun() {}
|
||||
}
|
||||
|
||||
trait B {
|
||||
interface B {
|
||||
protected open val protectedProperty : Int
|
||||
internal open val internalProperty : Int
|
||||
public open val publicProperty : Int
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A {
|
||||
interface A {
|
||||
fun foo(value : String) : Int = 0
|
||||
fun bar() : String = "hello"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A {
|
||||
interface A {
|
||||
fun foo(value : String) : Int = 0
|
||||
fun bar() : String = "hello"
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ open class A {
|
||||
open fun foo() {}
|
||||
}
|
||||
|
||||
trait B {
|
||||
interface B {
|
||||
fun bar()
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ open class A {
|
||||
open fun foo() {}
|
||||
}
|
||||
|
||||
trait B {
|
||||
interface B {
|
||||
fun bar()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A {
|
||||
interface A {
|
||||
fun String.foo()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A {
|
||||
interface A {
|
||||
fun String.foo()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A {
|
||||
interface A {
|
||||
val String.prop : Int
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A {
|
||||
interface A {
|
||||
val String.prop : Int
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Some {
|
||||
interface Some {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Some {
|
||||
interface Some {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Some {
|
||||
interface Some {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Some {
|
||||
interface Some {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Some {
|
||||
interface Some {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Some {
|
||||
interface Some {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A<T> {
|
||||
interface A<T> {
|
||||
fun foo(value : T) : Unit = println(value)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A<T> {
|
||||
interface A<T> {
|
||||
fun foo(value : T) : Unit = println(value)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A {
|
||||
interface A {
|
||||
var Int.foo : Double
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait A {
|
||||
interface A {
|
||||
var Int.foo : Double
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A {
|
||||
interface A {
|
||||
fun foo(value : String) : Int = 0
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A {
|
||||
interface A {
|
||||
fun foo(value : String) : Int = 0
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
val a1: Byte
|
||||
val a2: Short
|
||||
val a3: Int
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
val a1: Byte
|
||||
val a2: Short
|
||||
val a3: Int
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A {
|
||||
interface A {
|
||||
fun foo(value : String) : Unit = 0
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A {
|
||||
interface A {
|
||||
fun foo(value : String) : Unit = 0
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package foo
|
||||
|
||||
public trait Foo {
|
||||
public interface Foo {
|
||||
fun f(): Any
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
val v : Int
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait T {
|
||||
interface T {
|
||||
val v : Int
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Test {
|
||||
interface Test {
|
||||
public open fun test()
|
||||
protected open val testProp : Int
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Test {
|
||||
interface Test {
|
||||
public open fun test()
|
||||
protected open val testProp : Int
|
||||
}
|
||||
|
||||
@@ -4,6 +4,6 @@ package lib
|
||||
public class Array {
|
||||
}
|
||||
|
||||
public trait ArrayFactory {
|
||||
public interface ArrayFactory {
|
||||
fun create() : Array
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
class C<T : C<T>>
|
||||
|
||||
trait Base {
|
||||
interface Base {
|
||||
fun foo(c: C<*>)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class C<T : C<T>>
|
||||
|
||||
trait Base {
|
||||
interface Base {
|
||||
fun foo(c: C<*>)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait G<T> {
|
||||
interface G<T> {
|
||||
fun foo(t : T) : T
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait G<T> {
|
||||
interface G<T> {
|
||||
fun foo(t : T) : T
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Some {
|
||||
interface Some {
|
||||
fun foo(some : Int?) : Int
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait Some {
|
||||
interface Some {
|
||||
fun foo(some : Int?) : Int
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user