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,5 +1,5 @@
trait Map<K, out V>
trait MutableMap<K, V>: Map<K, V> {
interface Map<K, out V>
interface MutableMap<K, V>: Map<K, V> {
fun set(k: K, v: V)
}
@@ -1,9 +1,9 @@
trait A
trait B: A
trait D
interface A
interface B: A
interface D
trait BaseSuper<out T>
trait BaseImpl: BaseSuper<D>
trait DerivedSuper<out S>: <!INCONSISTENT_TYPE_PARAMETER_VALUES!>BaseSuper<S>, BaseImpl<!>
interface BaseSuper<out T>
interface BaseImpl: BaseSuper<D>
interface DerivedSuper<out S>: <!INCONSISTENT_TYPE_PARAMETER_VALUES!>BaseSuper<S>, BaseImpl<!>
fun test(t: BaseSuper<B>) = t is DerivedSuper<A>
@@ -1,6 +1,6 @@
trait A
trait B: A
interface A
interface B: A
trait Base<T>
interface Base<T>
fun <T> test(a: Base<B>) where T: Base<A> = a is <!CANNOT_CHECK_FOR_ERASED!>T<!>
@@ -1,3 +1,3 @@
trait A
trait B
interface A
interface B
fun testing(a: A) = a as B
@@ -1,4 +1,4 @@
trait Aaa
trait Bbb
interface Aaa
interface Bbb
fun f(a: Aaa) = a is Bbb
@@ -1,5 +1,5 @@
trait Tr
trait G<T>
interface Tr
interface G<T>
fun test(tr: Tr): Any {
return tr as G<<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>G<!>>
@@ -1,7 +1,7 @@
// !CHECK_TYPE
trait Tr<T>
trait G<T> : Tr<T>
interface Tr<T>
interface G<T> : Tr<T>
fun test(tr: Tr<String>) {
val v = tr as G?
@@ -1,7 +1,7 @@
// !CHECK_TYPE
trait Tr
trait G<T>
interface Tr
interface G<T>
fun test(tr: Tr) {
val v = tr as <!NO_TYPE_ARGUMENTS_ON_RHS!>G?<!>
@@ -1,8 +1,8 @@
// !CHECK_TYPE
trait Either<out A, out B>
trait Left<out A>: Either<A, Nothing>
trait Right<out B>: Either<Nothing, B>
interface Either<out A, out B>
interface Left<out A>: Either<A, Nothing>
interface Right<out B>: Either<Nothing, B>
class C1(val v1: Int)
class C2(val v2: Int)
@@ -1,9 +1,9 @@
// !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST
trait Either<out A, out B>
trait Left<out A>: Either<A, Nothing> {
interface Either<out A, out B>
interface Left<out A>: Either<A, Nothing> {
val value: A
}
trait Right<out B>: Either<Nothing, B> {
interface Right<out B>: Either<Nothing, B> {
val value: B
}
@@ -1,9 +1,9 @@
// !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST
trait Either<out A, out B>
trait Left<out A>: Either<A, Nothing> {
interface Either<out A, out B>
interface Left<out A>: Either<A, Nothing> {
val value: A
}
trait Right<out B>: Either<Nothing, B> {
interface Right<out B>: Either<Nothing, B> {
val value: B
}
@@ -1,8 +1,8 @@
// !CHECK_TYPE
trait Either<out A, out B>
trait Left<out A>: Either<A, Nothing>
trait Right<out B>: Either<Nothing, B>
interface Either<out A, out B>
interface Left<out A>: Either<A, Nothing>
interface Right<out B>: Either<Nothing, B>
class C1(val v1: Int)
class C2(val v2: Int)
@@ -1,9 +1,9 @@
// !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST
trait Either<out A, out B>
trait Left<out A>: Either<A, Nothing> {
interface Either<out A, out B>
interface Left<out A>: Either<A, Nothing> {
val value: A
}
trait Right<out B>: Either<Nothing, B> {
interface Right<out B>: Either<Nothing, B> {
val value: B
}
@@ -1,7 +1,7 @@
// !CHECK_TYPE
trait B<T>
trait G<T>: B<T>
interface B<T>
interface G<T>: B<T>
fun f(p: B<<!UNRESOLVED_REFERENCE!>Foo<!>>): Any {
val v = <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>p<!> as G
@@ -1,7 +1,7 @@
// !CHECK_TYPE
trait Tr<T>
trait G<T> : Tr<T>
interface Tr<T>
interface G<T> : Tr<T>
fun test(tr: Tr<String>?) {
val v = tr as G
@@ -1,7 +1,7 @@
// !CHECK_TYPE
trait Tr
trait G<T>
interface Tr
interface G<T>
fun test(tr: Tr?) {
val v = tr as <!NO_TYPE_ARGUMENTS_ON_RHS!>G<!>
@@ -1,7 +1,7 @@
// !CHECK_TYPE
trait Tr<T>
trait G<T> : Tr<T>
interface Tr<T>
interface G<T> : Tr<T>
fun test(tr: Tr<String>?) {
val v = tr as G?
@@ -1,7 +1,7 @@
// !CHECK_TYPE
trait Tr
trait G<T>
interface Tr
interface G<T>
fun test(tr: Tr?) {
val v = tr as <!NO_TYPE_ARGUMENTS_ON_RHS!>G?<!>
@@ -1,4 +1,4 @@
trait B<T>
interface B<T>
class G<T>: B<T>
fun f(b: B<String>?) = b is G?<!REDUNDANT_NULLABLE!>?<!>
@@ -1,7 +1,7 @@
// !CHECK_TYPE
trait Tr
trait G<T>
interface Tr
interface G<T>
fun test(tr: Tr) {
val v = tr as <!NO_TYPE_ARGUMENTS_ON_RHS!>G<!>
@@ -1,6 +1,6 @@
// !CHECK_TYPE
trait Tr
trait G<T>
interface Tr
interface G<T>
fun test(tr: Tr) = checkSubtype<<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>G<!>>(tr)
@@ -1,4 +1,4 @@
trait Tr
trait G<T>
interface Tr
interface G<T>
fun test(tr: Tr) = tr is <!NO_TYPE_ARGUMENTS_ON_RHS!>G<!>
@@ -1,4 +1,4 @@
class G<T>
trait Tr
interface Tr
fun f(q: Tr) = q is G<*>
@@ -1,12 +1,12 @@
// !DIAGNOSTICS: -WARNING +CAST_NEVER_SUCCEEDS
trait T1
trait T2
trait T3
interface T1
interface T2
interface T3
open class OC1: T1
open class OC2: OC1(), T2
class FC1: OC2(), T3
trait T4: OC1
trait T5: T2
interface T4: OC1
interface T5: T2
fun test<TP1: OC1, TP2: T2, TP3: OC2>(
t2: T2,
@@ -1,6 +1,6 @@
// !DIAGNOSTICS: -WARNING +CAST_NEVER_SUCCEEDS
trait Trait1
trait Trait2
interface Trait1
interface Trait2
open class OClass1
open class OClass2
class FClass1