Added checks for type arguments numbers in alternative signatures. Added tests.
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
package test;
|
||||
|
||||
import java.lang.UnsupportedOperationException;
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class WrongReturnTypeStructure {
|
||||
@KotlinSignature("fun foo(a : String, b : List<Map.Entry<String?, String>?>) : String<Int>?")
|
||||
public String foo(String a, List<Map.Entry<String, String>> b) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongReturnTypeStructure : Object() {
|
||||
public open fun foo(p0 : String?, p1 : List<Map.Entry<String?, String?>?>?) : String? = ""
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
namespace test
|
||||
|
||||
public open class test.WrongReturnTypeStructure : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongReturnTypeStructure
|
||||
public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: java.util.List<java.util.Map.Entry<jet.String?, jet.String?>?>?): jet.String?
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package test;
|
||||
|
||||
import java.lang.UnsupportedOperationException;
|
||||
import java.util.*;
|
||||
import java.util.BitSet;
|
||||
import java.util.List;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class WrongTypeParameterBoundStructure1 {
|
||||
@KotlinSignature("fun <A, B : Runnable<Int>> 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) {
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeParameterBoundStructure1 : Object() {
|
||||
public open fun <erased A, erased B : Runnable?> foo(p0 : A?, p1 : List<out B>?, p2: List<in String?>?) where B : List<Cloneable?>? {
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
namespace test
|
||||
|
||||
public open class test.WrongTypeParameterBoundStructure1 : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongTypeParameterBoundStructure1
|
||||
public 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
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package test;
|
||||
|
||||
import java.lang.UnsupportedOperationException;
|
||||
import java.util.*;
|
||||
import java.util.BitSet;
|
||||
import java.util.List;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class WrongTypeParameterBoundStructure2 {
|
||||
@KotlinSignature("fun <A, B : Runnable> foo(a : A, b : List<out B>, c: List<in String?>) where B : List")
|
||||
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b, List<? super String> list) {
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeParameterBoundStructure2 : Object() {
|
||||
public open fun <erased A, erased B : Runnable?> foo(p0 : A?, p1 : List<out B>?, p2: List<in String?>?) where B : List<Cloneable?>? {
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
namespace test
|
||||
|
||||
public open class test.WrongTypeParameterBoundStructure2 : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongTypeParameterBoundStructure2
|
||||
public 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
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package test;
|
||||
|
||||
import java.lang.UnsupportedOperationException;
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class WrongValueParameterStructure1 {
|
||||
@KotlinSignature("fun foo(a : String<Int?>, b : List<Map.Entry<String?, String>?>) : String")
|
||||
public String foo(String a, List<Map.Entry<String, String>> b) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongValueParameterStructure1 : Object() {
|
||||
public open fun foo(p0 : String?, p1 : List<Map.Entry<String?, String?>?>?) : String? = ""
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
namespace test
|
||||
|
||||
public open class test.WrongValueParameterStructure1 : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongValueParameterStructure1
|
||||
public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: java.util.List<java.util.Map.Entry<jet.String?, jet.String?>?>?): jet.String?
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package test;
|
||||
|
||||
import java.lang.UnsupportedOperationException;
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class WrongValueParameterStructure2 {
|
||||
@KotlinSignature("fun foo(a : String, b : List<Map.Entry<String?>?>) : String")
|
||||
public String foo(String a, List<Map.Entry<String, String>> b) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongValueParameterStructure2 : Object() {
|
||||
public open fun foo(p0 : String?, p1 : List<Map.Entry<String?, String?>?>?) : String? = ""
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
namespace test
|
||||
|
||||
public open class test.WrongValueParameterStructure2 : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongValueParameterStructure2
|
||||
public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: java.util.List<java.util.Map.Entry<jet.String?, jet.String?>?>?): jet.String?
|
||||
}
|
||||
Reference in New Issue
Block a user