compiler testdata: s/trait/interface
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
// !DIAGNOSTICS: -BASE_WITH_NULLABLE_UPPER_BOUND
|
||||
// !CHECK_TYPE
|
||||
trait A<T>
|
||||
interface A<T>
|
||||
|
||||
fun <T> foo(a: A<T>, aN: A<T?>): T = throw Exception("$a $aN")
|
||||
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
|
||||
package kt7351
|
||||
|
||||
trait Node
|
||||
interface Node
|
||||
|
||||
trait Source<T> {
|
||||
interface Source<T> {
|
||||
fun f() : T
|
||||
}
|
||||
fun <T, S : Source<T>> S.woo() : T = this.f()
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
// !CHECK_TYPE
|
||||
trait A<T>
|
||||
interface A<T>
|
||||
|
||||
trait In<in T>
|
||||
interface In<in T>
|
||||
|
||||
trait Out<out T>
|
||||
interface Out<out T>
|
||||
|
||||
fun <T: Any> doT(t: T?): T = throw Exception("$t")
|
||||
fun <T: Any> doOut(o: Out<T?>): T { throw Exception("$o") }
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// !DIAGNOSTICS: -BASE_WITH_NULLABLE_UPPER_BOUND
|
||||
// !CHECK_TYPE
|
||||
trait A<T>
|
||||
interface A<T>
|
||||
|
||||
trait Out<out T>
|
||||
interface Out<out T>
|
||||
|
||||
fun <T> foo(a: A<T>, o: Out<T?>): T = throw Exception("$a $o")
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// !DIAGNOSTICS: -BASE_WITH_NULLABLE_UPPER_BOUND
|
||||
// !CHECK_TYPE
|
||||
trait A<T>
|
||||
interface A<T>
|
||||
|
||||
trait In<in T>
|
||||
interface In<in T>
|
||||
|
||||
fun <T> foo(a: A<T>, i: In<T>): T = throw Exception("$a $i")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user