Added checking for FQ name prefixes in alternative signatures. Added tests.

This commit is contained in:
Evgeny Gerashchenko
2012-06-20 22:55:05 +04:00
parent a72017546b
commit a2066ab0ab
10 changed files with 99 additions and 4 deletions
@@ -0,0 +1,12 @@
package test;
import java.lang.UnsupportedOperationException;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
public class WrongTypeName1 {
@KotlinSignature("fun foo(a : String) : Unit")
public String foo(String a) {
throw new UnsupportedOperationException();
}
}
@@ -0,0 +1,7 @@
package test
import java.util.*
public open class WrongTypeName1 : Object() {
public open fun foo(p0 : String?) : String? = ""
}
@@ -0,0 +1,6 @@
namespace test
public open class test.WrongTypeName1 : java.lang.Object {
public final /*constructor*/ fun <init>(): test.WrongTypeName1
public open fun foo(/*0*/ p0: jet.String?): jet.String?
}
@@ -0,0 +1,12 @@
package test;
import java.lang.UnsupportedOperationException;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
public class WrongTypeName2 {
@KotlinSignature("fun foo(a : Something.String) : String")
public String foo(String a) {
throw new UnsupportedOperationException();
}
}
@@ -0,0 +1,7 @@
package test
import java.util.*
public open class WrongTypeName2 : Object() {
public open fun foo(p0 : String?) : String? = ""
}
@@ -0,0 +1,6 @@
namespace test
public open class test.WrongTypeName2 : java.lang.Object {
public final /*constructor*/ fun <init>(): test.WrongTypeName2
public open fun foo(/*0*/ p0: jet.String?): jet.String?
}
@@ -0,0 +1,12 @@
package test;
import java.lang.UnsupportedOperationException;
import java.util.*;
import jet.runtime.typeinfo.KotlinSignature;
public class WrongTypeName3 {
@KotlinSignature("fun foo(a : String) : List")
public String foo(String a) {
throw new UnsupportedOperationException();
}
}
@@ -0,0 +1,7 @@
package test
import java.util.*
public open class WrongTypeName3 : Object() {
public open fun foo(p0 : String?) : String? = ""
}
@@ -0,0 +1,6 @@
namespace test
public open class test.WrongTypeName3 : java.lang.Object {
public final /*constructor*/ fun <init>(): test.WrongTypeName3
public open fun foo(/*0*/ p0: jet.String?): jet.String?
}