compiler testdata: s/trait/interface

This commit is contained in:
Dmitry Jemerov
2015-05-12 12:38:49 +02:00
parent a5ed5d4269
commit 4bdf598bfe
803 changed files with 1456 additions and 1456 deletions
@@ -1,6 +1,6 @@
package test
trait A {
interface A {
private val a: String
get() = "AAAA!"
}
@@ -1,6 +1,6 @@
package test
trait A {
interface A {
protected val a: String
}
@@ -1,13 +1,13 @@
trait T {
interface T {
internal var foo: Long
}
trait U {
interface U {
protected var foo: Long
}
trait V : T, U {
interface V : T, U {
<!CANNOT_INFER_VISIBILITY!>override var foo: Long<!>
}
trait <!CANNOT_INFER_VISIBILITY!>W<!> : T, U
interface <!CANNOT_INFER_VISIBILITY!>W<!> : T, U
@@ -1,13 +1,13 @@
trait T {
interface T {
public var foo: Short
internal set
}
trait U {
interface U {
public var foo: Short
protected set
}
trait V : T, U {
interface V : T, U {
<!CANNOT_INFER_VISIBILITY!>override var foo: Short<!>
}
@@ -1,8 +1,8 @@
trait Y {
interface Y {
fun foo(a : Int = 1)
}
trait YSub : Y {
interface YSub : Y {
}
@@ -1,18 +1,18 @@
package test
trait X {
interface X {
fun foo(): String? {
return null
}
}
trait Y {
interface Y {
fun foo(): String {
return "foo"
}
}
trait Incompatible {
interface Incompatible {
fun foo(): Int {
return 3
}
@@ -1,6 +1,6 @@
package delegation
trait Aaa {
interface Aaa {
fun foo()
}
@@ -1,6 +1,6 @@
package delegation
trait Aaa {
interface Aaa {
val i: Int
}
@@ -1,6 +1,6 @@
package delegation
trait Aaa {
interface Aaa {
var i: Int
}
@@ -1,4 +1,4 @@
trait Some {
interface Some {
fun test()
}
@@ -1,7 +1,7 @@
trait Foo
trait Bar
interface Foo
interface Bar
trait A {
interface A {
fun <T> foo()
where T : Foo, T : Bar
= Unit
@@ -2,7 +2,7 @@ open class Ccc() {
fun foo() = 1
}
trait Ttt {
interface Ttt {
fun foo(): Int
}
@@ -1,4 +1,4 @@
trait A {
interface A {
fun f(): String = "string"
}
@@ -1,6 +1,6 @@
package override.generics
trait MyTrait<T> {
interface MyTrait<T> {
fun foo(t: T) : T
}
@@ -9,7 +9,7 @@ abstract class MyAbstractClass<T> {
abstract val pr : T
}
trait MyProps<T> {
interface MyProps<T> {
val p : T
}
@@ -1,8 +1,8 @@
trait X {
interface X {
fun foo(a : Int = 1)
}
trait Y {
interface Y {
fun foo(a : Int = 1)
}
@@ -1,8 +1,8 @@
trait X {
interface X {
fun foo(a : Int = 1)
}
trait Y {
interface Y {
fun foo(a : Int = 1)
}
@@ -1,4 +1,4 @@
trait A {
interface A {
fun foo(x: Int = 42): Int
}
@@ -6,7 +6,7 @@ open class B {
fun foo(x: Int = 239) = x
}
trait C {
interface C {
fun foo(y: Int)
}
@@ -1,8 +1,8 @@
trait X {
interface X {
fun foo(a : Int = 1)
}
trait Y {
interface Y {
fun foo(a : Int = 1)
}
@@ -1,6 +1,6 @@
package override.normal
trait MyTrait {
interface MyTrait {
fun foo()
val pr : Unit
}
@@ -1,8 +1,8 @@
trait D {
interface D {
fun foo()
}
trait E {
interface E {
fun foo() {}
}
@@ -1,8 +1,8 @@
trait X {
interface X {
fun foo(a : Int = 1)
}
trait Y {
interface Y {
fun foo(a : Int)
}
@@ -1,16 +1,16 @@
package d
trait A {
interface A {
fun foo() = 1
}
trait B {
interface B {
fun foo() = 2
}
open <!MANY_IMPL_MEMBER_NOT_IMPLEMENTED!>class C<!> : A, B {}
trait E {
interface E {
fun foo(): Int
}
@@ -1,10 +1,10 @@
package test
trait A {
interface A {
protected val a: String
}
trait B {
interface B {
protected val a: String
}
@@ -1,11 +1,11 @@
// NamedFunctionDescriptor.substitute substitutes "overrides"
// this test checks it does it properly
trait Foo<P> {
interface Foo<P> {
fun quux(p: P, q: Int = 17) : Int = 18
}
trait Bar<Q> : Foo<Q>
interface Bar<Q> : Foo<Q>
abstract class Baz() : Bar<String>
@@ -1,10 +1,10 @@
// http://youtrack.jetbrains.com/issue/KT-1996
trait Foo {
interface Foo {
fun foo(): Unit
}
trait Bar {
interface Bar {
fun foo(): Unit
}
@@ -6,6 +6,6 @@ open class Bbb() : Aaa() {
override fun foo() = 2
}
trait Ccc : <!TRAIT_WITH_SUPERCLASS!>Aaa<!>
interface Ccc : <!TRAIT_WITH_SUPERCLASS!>Aaa<!>
class Ddd() : Bbb(), Ccc
@@ -1,4 +1,4 @@
trait Runnable {
interface Runnable {
fun run()
}
@@ -1,4 +1,4 @@
trait T {
interface T {
public fun foo()
}
@@ -1,4 +1,4 @@
trait A {
interface A {
fun f(): String
}
@@ -1,4 +1,4 @@
trait P {
interface P {
var f: Number
}
@@ -1,4 +1,4 @@
trait T {
interface T {
internal fun foo()
}
@@ -1,8 +1,8 @@
trait A {
interface A {
internal fun foo()
}
trait B {
interface B {
protected fun foo() {}
}
@@ -1,8 +1,8 @@
trait A {
interface A {
internal fun foo()
}
trait B {
interface B {
protected fun foo()
}
@@ -1,6 +1,6 @@
// KT-880 Overload resolution ambiguity
public trait I {
public interface I {
open fun test() : Unit
}
@@ -1,8 +1,8 @@
trait A {
interface A {
fun b(a : Int)
}
trait B : A {}
interface B : A {}
class C1 : A {
override fun b(<!PARAMETER_NAME_CHANGED_ON_OVERRIDE!>b<!> : Int) {}
@@ -1,14 +1,14 @@
trait C {
interface C {
fun foo(a : Int)
}
trait D {
interface D {
fun foo(b : Int)
}
<!DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES!>trait E<!> : C, D
<!DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES!>interface E<!> : C, D
trait F : C, D {
interface F : C, D {
override fun foo(<!PARAMETER_NAME_CHANGED_ON_OVERRIDE!>a<!> : Int) {
throw UnsupportedOperationException()
}
@@ -1,6 +1,6 @@
// FILE: Super.kt
trait Super {
interface Super {
fun foo(superName: Int)
}
@@ -1,6 +1,6 @@
// FILE: KSuper.kt
trait KSuper {
interface KSuper {
fun foo(ksuperName: Int)
}
@@ -6,7 +6,7 @@ interface JavaInterface {
// FILE: kotlin.kt
trait KotlinTrait {
interface KotlinTrait {
public fun foo(someOtherName: Int) {}
}
@@ -11,7 +11,7 @@ class SimpleSubclass : JavaInterface {
}
trait SubtraitWithFakeOverride : JavaInterface
interface SubtraitWithFakeOverride : JavaInterface
class Subclass : SubtraitWithFakeOverride {
override fun foo(otherKotlinName: Int) {}