remove support for 'trait' keyword
This commit is contained in:
+2
-2
@@ -1,10 +1,10 @@
|
||||
package foo
|
||||
|
||||
public trait A {
|
||||
public interface A {
|
||||
fun foo() {
|
||||
}
|
||||
}
|
||||
public trait B : A {
|
||||
public interface B : A {
|
||||
fun boo() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ open class A() {
|
||||
val value = "BAR"
|
||||
}
|
||||
|
||||
trait Test {
|
||||
interface Test {
|
||||
fun addFoo(s: String): String {
|
||||
return s + "FOO"
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ open class A() {
|
||||
val value = "BAR"
|
||||
}
|
||||
|
||||
trait Test {
|
||||
interface Test {
|
||||
fun addFoo(s: String): String {
|
||||
return s + "FOO"
|
||||
}
|
||||
|
||||
@@ -32,16 +32,16 @@ open class A() : F {
|
||||
}
|
||||
}
|
||||
|
||||
trait F : G {
|
||||
interface F : G {
|
||||
fun bar() = "F"
|
||||
}
|
||||
|
||||
// KT-3437
|
||||
trait G : H
|
||||
trait K : H
|
||||
trait L
|
||||
trait H : L
|
||||
trait Dummy
|
||||
interface G : H
|
||||
interface K : H
|
||||
interface L
|
||||
interface H : L
|
||||
interface Dummy
|
||||
|
||||
fun box(): Boolean {
|
||||
return (C().order == "ABC") && (D().order == "ABD") && (E().order == "AE") && (C().bar() == "F") && (A().bar() == "F")
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package foo
|
||||
|
||||
trait AL {
|
||||
interface AL {
|
||||
fun get(index: Int): Any? = null
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ open class Base() {
|
||||
fun n(n: Int): Int = n + 1
|
||||
}
|
||||
|
||||
trait Abstract {
|
||||
interface Abstract {
|
||||
}
|
||||
|
||||
class Derived1() : Base(), Abstract {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package foo
|
||||
|
||||
trait Test {
|
||||
interface Test {
|
||||
fun addFoo(s: String): String {
|
||||
return s + "FOO"
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package foo
|
||||
|
||||
trait Test {
|
||||
interface Test {
|
||||
fun addFoo(s: String): String {
|
||||
return s + "FOO"
|
||||
}
|
||||
}
|
||||
|
||||
trait ExtendedTest : Test {
|
||||
interface ExtendedTest : Test {
|
||||
fun hooray(): String {
|
||||
return "hooray"
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package foo
|
||||
|
||||
trait A {
|
||||
interface A {
|
||||
fun addFoo(s: String): String {
|
||||
return s + "FOO"
|
||||
}
|
||||
}
|
||||
|
||||
trait B {
|
||||
interface B {
|
||||
fun hooray(): String {
|
||||
return "hooray"
|
||||
}
|
||||
}
|
||||
|
||||
trait AD : A, B {
|
||||
interface AD : A, B {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user