compiler testdata: s/trait/interface
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
trait G {
|
||||
interface G {
|
||||
fun get(x: Int, y: Int): Int = x + y
|
||||
fun set(x: Int, y: Int, value: Int) {}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
trait A
|
||||
trait B : A {
|
||||
interface A
|
||||
interface B : A {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// KT-2825 DataFlowInfo is not retained after assignment
|
||||
|
||||
trait A
|
||||
interface A
|
||||
|
||||
trait B : A {
|
||||
interface B : A {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
trait A
|
||||
interface A
|
||||
|
||||
trait B : A
|
||||
interface B : A
|
||||
fun B.compareTo(b: B) = if (this == b) 0 else 1
|
||||
|
||||
fun foo(a: A): Boolean {
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
trait A
|
||||
trait B : A
|
||||
interface A
|
||||
interface B : A
|
||||
|
||||
fun foo1(a: A, b: B): Boolean {
|
||||
val result = (a as B) == b
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
trait A
|
||||
interface A
|
||||
|
||||
trait B : A
|
||||
interface B : A
|
||||
fun B.plus(b: B) = if (this == b) b else this
|
||||
|
||||
fun foo(a: A): B {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
trait B {
|
||||
interface B {
|
||||
fun bar() {}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ fun Any?.foo() : Int {
|
||||
}
|
||||
|
||||
|
||||
trait T {}
|
||||
interface T {}
|
||||
|
||||
open class C {
|
||||
fun foo() {
|
||||
|
||||
Reference in New Issue
Block a user