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,8 +1,8 @@
trait ISized {
interface ISized {
val size : Int
}
trait javaUtilIterator<T> : Iterator<T> {
interface javaUtilIterator<T> : Iterator<T> {
fun remove() : Unit {
throw UnsupportedOperationException()
}
@@ -16,13 +16,13 @@ class MyIterator<T>(val array : ReadOnlyArray<T>) : javaUtilIterator<T> {
override fun next() : T = array.get(index++)
}
trait ReadOnlyArray<out T> : ISized, Iterable<T> {
interface ReadOnlyArray<out T> : ISized, Iterable<T> {
fun get(index : Int) : T
override fun iterator() : Iterator<T> = MyIterator<T>(this)
}
trait WriteOnlyArray<in T> : ISized {
interface WriteOnlyArray<in T> : ISized {
fun set(index : Int, value : T) : Unit
fun set(from: Int, count: Int, value: T) {
@@ -1,4 +1,4 @@
trait Named {
interface Named {
fun name(): String
}
@@ -1,4 +1,4 @@
trait T {
interface T {
fun foo() = "OK"
}
@@ -1,4 +1,4 @@
trait A {
interface A {
fun foo(): String
}
@@ -1,4 +1,4 @@
trait SuperTrait {
interface SuperTrait {
override fun toString(): String = "!"
}
@@ -2,7 +2,7 @@ package testeval
import java.util.*
trait Expression
interface Expression
class Num(val value : Int) : Expression
class Sum(val left : Expression, val right : Expression) : Expression
class Mult(val left : Expression, val right : Expression) : Expression
@@ -16,7 +16,7 @@ fun eval(e : Expression) : Int {
}
}
trait ParseResult<out T> {
interface ParseResult<out T> {
val success : Boolean
val value : T
}
@@ -1,4 +1,4 @@
trait A {
interface A {
fun f(): String
}
@@ -1,7 +1,7 @@
import kotlin.properties.Delegates
import java.util.HashMap
trait R {
interface R {
fun result(): String
}
@@ -1,4 +1,4 @@
trait C {
interface C {
val a: Any
}
@@ -4,7 +4,7 @@ class G<T>(val s: T) {
}
public trait ErrorsJvmTrait {
public interface ErrorsJvmTrait {
companion object {
public val param : G<String> = G("STRING")
}
@@ -3,7 +3,7 @@ package test.regressions.kt1149
import java.util.ArrayList
import kotlin.util.*
public trait SomeTrait {
public interface SomeTrait {
fun foo()
}
@@ -3,7 +3,7 @@ open class B {
get() = "OK"
}
trait A {
interface A {
val name: String
}
@@ -1,6 +1,6 @@
import kotlin.support.*
trait Stream<T> {
interface Stream<T> {
fun iterator(): Iterator<T>
}
@@ -1,6 +1,6 @@
import kotlin.test.assertEquals
trait A {
interface A {
fun f1(): String
fun f2(): String
fun f3(): String
@@ -2,7 +2,7 @@ import kotlin.test.assertEquals
fun foo(block: () -> String) = block()
trait A {
interface A {
fun f(): String
fun g(): String
}
@@ -6,7 +6,7 @@ inline fun <reified T> className(): String = javaClass<T>().getName()
inline fun <reified T> lambdaShouldBeReified(): String = foo { className<T>() }
trait A {
interface A {
fun f(): String
fun g(): String
}
@@ -4,7 +4,7 @@ fun foo(block: () -> String) = block()
inline fun<reified T> className(): String = javaClass<T>().getName()
trait A {
interface A {
fun f(): String
fun g(): String
}