Tests for loading KotlinSignature annotation for constructors
#KT-2774 In Progress
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class ConstructorWithNewTypeParams<T> {
|
||||
@KotlinSignature("fun ConstructorWithNewTypeParams(first : Any)") // TODO: first : U doesn't work
|
||||
public <U>ConstructorWithNewTypeParams(U first) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
public open class ConstructorWithNewTypeParams<T>(p0 : Any) : java.lang.Object() {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace test
|
||||
|
||||
public open class test.ConstructorWithNewTypeParams</*0*/ T : jet.Any?> : java.lang.Object {
|
||||
public final /*constructor*/ fun </*0*/ T : jet.Any?><init>(/*0*/ p0: jet.Any): test.ConstructorWithNewTypeParams<T>
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class ConstructorWithParentTypeParams<T> {
|
||||
@KotlinSignature("fun ConstructorWithParentTypeParams(first: T)")
|
||||
public ConstructorWithParentTypeParams(T first) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
public open class ConstructorWithParentTypeParams<T>(p0 : T) : java.lang.Object() {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace test
|
||||
|
||||
public open class test.ConstructorWithParentTypeParams</*0*/ T : jet.Any?> : java.lang.Object {
|
||||
public final /*constructor*/ fun </*0*/ T : jet.Any?><init>(/*0*/ p0: T): test.ConstructorWithParentTypeParams<T>
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class ConstructorWithSeveralParams {
|
||||
@KotlinSignature("fun ConstructorWithSeveralParams(integer : Int, intField : Int, collection: ArrayList<String>)")
|
||||
public ConstructorWithSeveralParams(Integer integer, int intBasic, ArrayList<String> collection) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class ConstructorWithSeveralParams(p0: Int, p1 : Int, p2 : ArrayList<String>) : java.lang.Object() {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace test
|
||||
|
||||
public open class test.ConstructorWithSeveralParams : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(/*0*/ p0: jet.Int, /*1*/ p1: jet.Int, /*2*/ p2: java.util.ArrayList<jet.String>): test.ConstructorWithSeveralParams
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class ConstructorWithoutParams {
|
||||
@KotlinSignature("fun ConstructorWithoutParams()")
|
||||
public ConstructorWithoutParams() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
public open class ConstructorWithoutParams() : java.lang.Object() {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace test
|
||||
|
||||
public open class test.ConstructorWithoutParams : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.ConstructorWithoutParams
|
||||
}
|
||||
Reference in New Issue
Block a user