Read*BinaryClassTest: type parameter with two upper bounds
This commit is contained in:
@@ -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
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
trait Foo
|
||||||
|
trait Bar
|
||||||
|
|
||||||
|
fun <T> foo()
|
||||||
|
where T : Foo, T : Bar
|
||||||
|
= #()
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
namespace test
|
||||||
|
|
||||||
|
abstract trait test.Foo : jet.Any {
|
||||||
|
}
|
||||||
|
abstract trait test.Bar : jet.Any {
|
||||||
|
}
|
||||||
|
final fun </*0,r*/ T : test.Bar & test.Foo>foo(): jet.Tuple0
|
||||||
Reference in New Issue
Block a user