Added alternative signature test for method with type parameters.

This commit is contained in:
Evgeny Gerashchenko
2012-06-05 13:24:58 +04:00
parent 247e3978d9
commit a4c4e2b0f1
3 changed files with 44 additions and 0 deletions

View File

@@ -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 <A, B : Runnable> foo(a : A, b : List<out B>, c: List<in String?>) where B : List<Cloneable>")
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b, List<? super String> list) {
}
}

View File

@@ -0,0 +1,8 @@
package test
import java.util.*
public open class MethodWithTypeParameters : Object() {
open fun <erased A, erased B : Runnable> foo(p0 : A, p1 : List<out B>, p2: List<in String?>) where B : List<Cloneable> {
}
}

View File

@@ -0,0 +1,6 @@
namespace test
open class test.MethodWithTypeParameters : java.lang.Object {
final /*constructor*/ fun <init>(): test.MethodWithTypeParameters
open fun </*0*/ A : jet.Any?, /*1*/ B : java.lang.Runnable & java.util.List<java.lang.Cloneable>>foo(/*0*/ p0: A, /*1*/ p1: java.util.List<out B>, /*2*/ p2: java.util.List<in jet.String?>): jet.Tuple0
}