Read*BinaryClassTest: type parameter with two upper bounds

This commit is contained in:
Stepan Koltsov
2012-05-10 18:56:18 +04:00
parent 7aa4a32f3e
commit a00e765bd5
8 changed files with 65 additions and 0 deletions
@@ -0,0 +1,7 @@
package test;
interface Foo {}
class MethodTypePOneUpperBound {
<T extends Foo> void bar() {}
}
@@ -0,0 +1,7 @@
package test
trait Foo : java.lang.Object
open class MethodTypePOneUpperBound() : java.lang.Object() {
open fun <erased T : Foo?> bar() = #()
}
@@ -0,0 +1,8 @@
namespace test
abstract trait test.Foo : java.lang.Object {
}
open class test.MethodTypePOneUpperBound : java.lang.Object {
final /*constructor*/ fun <init>(): test.MethodTypePOneUpperBound
open fun </*0*/ T : test.Foo?>bar(): jet.Tuple0
}
@@ -0,0 +1,8 @@
package test;
interface Foo {}
interface Bar {}
class MethodTypePTwoUpperBounds {
<T extends Foo & Bar> void foo() {}
}
@@ -0,0 +1,10 @@
package test
trait Foo : java.lang.Object
trait Bar : java.lang.Object
open class MethodTypePTwoUpperBounds() : java.lang.Object() {
open fun <erased T> foo(): Unit
where T : Foo?, T : Bar?
{}
}
@@ -0,0 +1,10 @@
namespace test
abstract trait test.Foo : java.lang.Object {
}
abstract trait test.Bar : java.lang.Object {
}
open class test.MethodTypePTwoUpperBounds : java.lang.Object {
final /*constructor*/ fun <init>(): test.MethodTypePTwoUpperBounds
open fun </*0*/ T : test.Bar? & test.Foo?>foo(): jet.Tuple0
}