From a4c4e2b0f1da3defd331d6a3d738c6db4bcd26fa Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Tue, 5 Jun 2012 13:24:58 +0400 Subject: [PATCH] Added alternative signature test for method with type parameters. --- .../MethodWithTypeParameters.java | 30 +++++++++++++++++++ .../MethodWithTypeParameters.kt | 8 +++++ .../MethodWithTypeParameters.txt | 6 ++++ 3 files changed, 44 insertions(+) create mode 100644 compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.java create mode 100644 compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.kt create mode 100644 compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.txt diff --git a/compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.java b/compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.java new file mode 100644 index 00000000000..1f2bd71121f --- /dev/null +++ b/compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.java @@ -0,0 +1,30 @@ +/* + * Copyright 2010-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package test; + +import java.lang.UnsupportedOperationException; +import java.util.*; +import java.util.BitSet; +import java.util.List; + +import jet.runtime.typeinfo.KotlinSignature; + +public class MethodWithTypeParameters { + @KotlinSignature("fun foo(a : A, b : List, c: List) where B : List") + public > void foo(A a, List b, List list) { + } +} diff --git a/compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.kt b/compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.kt new file mode 100644 index 00000000000..672b1f477f6 --- /dev/null +++ b/compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.kt @@ -0,0 +1,8 @@ +package test + +import java.util.* + +public open class MethodWithTypeParameters : Object() { + open fun foo(p0 : A, p1 : List, p2: List) where B : List { + } +} diff --git a/compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.txt b/compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.txt new file mode 100644 index 00000000000..7cea7924ea1 --- /dev/null +++ b/compiler/testData/readJavaBinaryClass/kotlinSignature/MethodWithTypeParameters.txt @@ -0,0 +1,6 @@ +namespace test + +open class test.MethodWithTypeParameters : java.lang.Object { + final /*constructor*/ fun (): test.MethodWithTypeParameters + open fun >foo(/*0*/ p0: A, /*1*/ p1: java.util.List, /*2*/ p2: java.util.List): jet.Tuple0 +}