compiler testdata: s/trait/interface
This commit is contained in:
@@ -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<!>
|
||||
Reference in New Issue
Block a user