From a00e765bd559981620053a01e86d5911790db3c8 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Thu, 10 May 2012 18:56:18 +0400 Subject: [PATCH] Read*BinaryClassTest: type parameter with two upper bounds --- .../readJavaBinaryClass/MethodTypePOneUpperBound.java | 7 +++++++ .../readJavaBinaryClass/MethodTypePOneUpperBound.kt | 7 +++++++ .../readJavaBinaryClass/MethodTypePOneUpperBound.txt | 8 ++++++++ .../readJavaBinaryClass/MethodTypePTwoUpperBounds.java | 8 ++++++++ .../readJavaBinaryClass/MethodTypePTwoUpperBounds.kt | 10 ++++++++++ .../readJavaBinaryClass/MethodTypePTwoUpperBounds.txt | 10 ++++++++++ .../genericWithTypeVariables/FunParamTwoUpperBounds.kt | 8 ++++++++ .../FunParamTwoUpperBounds.txt | 7 +++++++ 8 files changed, 65 insertions(+) create mode 100644 compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.java create mode 100644 compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.kt create mode 100644 compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.txt create mode 100644 compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.java create mode 100644 compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.kt create mode 100644 compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.txt create mode 100644 compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt create mode 100644 compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.txt diff --git a/compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.java b/compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.java new file mode 100644 index 00000000000..6fb68424b6f --- /dev/null +++ b/compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.java @@ -0,0 +1,7 @@ +package test; + +interface Foo {} + +class MethodTypePOneUpperBound { + void bar() {} +} diff --git a/compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.kt b/compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.kt new file mode 100644 index 00000000000..c97120384de --- /dev/null +++ b/compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.kt @@ -0,0 +1,7 @@ +package test + +trait Foo : java.lang.Object + +open class MethodTypePOneUpperBound() : java.lang.Object() { + open fun bar() = #() +} diff --git a/compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.txt b/compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.txt new file mode 100644 index 00000000000..9c83aa73f65 --- /dev/null +++ b/compiler/testData/readJavaBinaryClass/MethodTypePOneUpperBound.txt @@ -0,0 +1,8 @@ +namespace test + +abstract trait test.Foo : java.lang.Object { +} +open class test.MethodTypePOneUpperBound : java.lang.Object { + final /*constructor*/ fun (): test.MethodTypePOneUpperBound + open fun bar(): jet.Tuple0 +} diff --git a/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.java b/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.java new file mode 100644 index 00000000000..ff53fa28737 --- /dev/null +++ b/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.java @@ -0,0 +1,8 @@ +package test; + +interface Foo {} +interface Bar {} + +class MethodTypePTwoUpperBounds { + void foo() {} +} diff --git a/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.kt b/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.kt new file mode 100644 index 00000000000..82b931e6692 --- /dev/null +++ b/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.kt @@ -0,0 +1,10 @@ +package test + +trait Foo : java.lang.Object +trait Bar : java.lang.Object + +open class MethodTypePTwoUpperBounds() : java.lang.Object() { + open fun foo(): Unit + where T : Foo?, T : Bar? + {} +} diff --git a/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.txt b/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.txt new file mode 100644 index 00000000000..8c4d02d3bcb --- /dev/null +++ b/compiler/testData/readJavaBinaryClass/MethodTypePTwoUpperBounds.txt @@ -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 (): test.MethodTypePTwoUpperBounds + open fun foo(): jet.Tuple0 +} diff --git a/compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt b/compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt new file mode 100644 index 00000000000..cc7759ea454 --- /dev/null +++ b/compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt @@ -0,0 +1,8 @@ +package test + +trait Foo +trait Bar + +fun foo() + where T : Foo, T : Bar + = #() diff --git a/compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.txt b/compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.txt new file mode 100644 index 00000000000..e09763ba27a --- /dev/null +++ b/compiler/testData/readKotlinBinaryClass/fun/genericWithTypeVariables/FunParamTwoUpperBounds.txt @@ -0,0 +1,7 @@ +namespace test + +abstract trait test.Foo : jet.Any { +} +abstract trait test.Bar : jet.Any { +} +final fun foo(): jet.Tuple0