Moved loadJava "general" tests to subdirectory.
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class AddingNullability {
|
||||
@ExpectLoadError("Auto type 'jet.Int' is not-null, while type in alternative signature is nullable: 'Int?'")
|
||||
@KotlinSignature("fun foo() : Int?")
|
||||
public int foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class AddingNullability : Object() {
|
||||
public open fun foo() : Int {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class AddingNullability : java.lang.Object {
|
||||
public constructor AddingNullability()
|
||||
public open fun foo() : jet.Int
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package test;
|
||||
|
||||
import java.lang.Number;
|
||||
import java.util.*;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class ConflictingProjectionKind {
|
||||
@ExpectLoadError("Projection kind 'in' is conflicting with variance of jet.List")
|
||||
@KotlinSignature("fun foo(list: List<in Number>)")
|
||||
public void foo(List<Number> list) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
public open class ConflictingProjectionKind : Object() {
|
||||
public open fun foo(p0: List<Number>?) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class ConflictingProjectionKind : java.lang.Object {
|
||||
public constructor ConflictingProjectionKind()
|
||||
public open fun foo(/*0*/ p0 : jet.List<jet.Number>?) : Unit
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class ExplicitFieldGettersAndSetters {
|
||||
@ExpectLoadError("Field annotation for shouldn't have getters and setters")
|
||||
@KotlinSignature("var foo: String get() { return \"hello\" }")
|
||||
public String foo;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class ExplicitFieldGettersAndSetters : Object() {
|
||||
public var foo : String? = ""
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class ExplicitFieldGettersAndSetters : java.lang.Object {
|
||||
public constructor ExplicitFieldGettersAndSetters()
|
||||
public final var foo : jet.String?
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class ExtraUpperBound {
|
||||
@ExpectLoadError("Extra upper bound #1 for type parameter A")
|
||||
@KotlinSignature("fun <A : Runnable> foo() : String where A : Cloneable")
|
||||
public <A extends Runnable> String foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class ExtraUpperBound : Object() {
|
||||
public open fun <A : Runnable?> foo() : String? {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class ExtraUpperBound : java.lang.Object {
|
||||
public constructor ExtraUpperBound()
|
||||
public open fun </*0*/ A : java.lang.Runnable?> foo() : jet.String?
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class MissingUpperBound {
|
||||
@ExpectLoadError("Upper bound #1 for type parameter A is missing")
|
||||
@KotlinSignature("fun <A : Runnable> foo() : String")
|
||||
public <A extends Runnable & Cloneable> String foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class MissingUpperBound : Object() {
|
||||
public open fun <A : Runnable?> foo() : String? where A : Cloneable? {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class MissingUpperBound : java.lang.Object {
|
||||
public constructor MissingUpperBound()
|
||||
public open fun </*0*/ A> foo() : jet.String? where A : java.lang.Runnable?, A : java.lang.Cloneable?
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class NoFieldTypeRef {
|
||||
@ExpectLoadError("Field annotation for shouldn't have type reference")
|
||||
@KotlinSignature("var foo")
|
||||
public String foo;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class NoFieldTypeRef : Object() {
|
||||
public var foo : String? = ""
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class NoFieldTypeRef : java.lang.Object {
|
||||
public constructor NoFieldTypeRef()
|
||||
public final var foo : jet.String?
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class NotVarargReplacedWithVararg {
|
||||
@ExpectLoadError("Parameter in method signature is not vararg, but in alternative signature it is vararg")
|
||||
@KotlinSignature("fun foo(vararg s : String)")
|
||||
public void foo(String s) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class NotVarargReplacedWithVararg : Object() {
|
||||
public open fun foo(p0 : String?) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class NotVarargReplacedWithVararg : java.lang.Object {
|
||||
public constructor NotVarargReplacedWithVararg()
|
||||
public open fun foo(/*0*/ p0 : jet.String?) : Unit
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package test;
|
||||
|
||||
import java.lang.Number;
|
||||
import java.util.*;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class RedundantProjectionKind {
|
||||
@KotlinSignature("fun foo(list: List<out Number>)")
|
||||
public void foo(List<Number> list) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
public open class RedundantProjectionKind : Object() {
|
||||
public open fun foo(p0: List<Number>) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class RedundantProjectionKind : java.lang.Object {
|
||||
public constructor RedundantProjectionKind()
|
||||
public open fun foo(/*0*/ p0 : jet.List<jet.Number>) : Unit
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class ReturnTypeMissing {
|
||||
@ExpectLoadError("Return type in alternative signature is missing, while in real signature it is 'jet.Int'")
|
||||
@KotlinSignature("fun foo(a : String)")
|
||||
public int foo(String a) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class ReturnTypeMissing : Object() {
|
||||
public open fun foo(p0 : String?) : Int {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class ReturnTypeMissing : java.lang.Object {
|
||||
public constructor ReturnTypeMissing()
|
||||
public open fun foo(/*0*/ p0 : jet.String?) : jet.Int
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class SyntaxError {
|
||||
@ExpectLoadError("Alternative signature has 2 syntax errors, first is at 8: Expecting a parameter declaration")
|
||||
@KotlinSignature("fun foo(,) : Int")
|
||||
public Integer foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class SyntaxError : Object() {
|
||||
public open fun foo() : Int? {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class SyntaxError : java.lang.Object {
|
||||
public constructor SyntaxError()
|
||||
public open fun foo() : jet.Int?
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class SyntaxErrorInFieldAnnotation {
|
||||
@ExpectLoadError("Alternative signature has syntax error at 10: Type expected")
|
||||
@KotlinSignature("var foo : ")
|
||||
public String foo;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class SyntaxErrorInFieldAnnotation : Object() {
|
||||
public var foo : String? = ""
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class SyntaxErrorInFieldAnnotation : java.lang.Object {
|
||||
public constructor SyntaxErrorInFieldAnnotation()
|
||||
public final var foo : jet.String?
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class VarargReplacedWithNotVararg {
|
||||
@ExpectLoadError("Parameter in method signature is vararg, but in alternative signature it is not")
|
||||
@KotlinSignature("fun foo(s : String)")
|
||||
public void foo(String... s) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class VarargReplacedWithNotVararg : Object() {
|
||||
public open fun foo(vararg p0 : String?) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class VarargReplacedWithNotVararg : java.lang.Object {
|
||||
public constructor VarargReplacedWithNotVararg()
|
||||
public open fun foo(/*0*/ vararg p0 : jet.String? /*jet.Array<jet.String?>*/) : Unit
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongFieldInitializer {
|
||||
@ExpectLoadError("Default value is not expected in annotation for field")
|
||||
@KotlinSignature("var foo : String = \"Test\"")
|
||||
public String foo;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongFieldInitializer : Object() {
|
||||
public var foo : String? = ""
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class WrongFieldInitializer : java.lang.Object {
|
||||
public constructor WrongFieldInitializer()
|
||||
public final var foo : jet.String?
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongFieldMutability {
|
||||
@ExpectLoadError("Wrong mutability in annotation for field")
|
||||
@KotlinSignature("val fooNotFinal : String")
|
||||
public String fooNotFinal;
|
||||
|
||||
@ExpectLoadError("Wrong mutability in annotation for field")
|
||||
@KotlinSignature("var fooFinal : String")
|
||||
public final String fooFinal = "Test";
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongFieldMutability : Object() {
|
||||
public var fooNotFinal : String? = ""
|
||||
public val fooFinal : String? = ""
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
public open class WrongFieldMutability : java.lang.Object {
|
||||
public constructor WrongFieldMutability()
|
||||
public final val fooFinal : jet.String?
|
||||
public final var fooNotFinal : jet.String?
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongFieldName {
|
||||
@ExpectLoadError("Field name mismatch, original: foo, alternative: bar")
|
||||
@KotlinSignature("var bar: String")
|
||||
public String foo;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongFieldName : Object() {
|
||||
public var foo : String? = ""
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class WrongFieldName : java.lang.Object {
|
||||
public constructor WrongFieldName()
|
||||
public final var foo : jet.String?
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongMethodName {
|
||||
@ExpectLoadError("Function names mismatch, original: foo, alternative: bar")
|
||||
@KotlinSignature("fun bar() : String")
|
||||
public String foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongMethodName : Object() {
|
||||
public open fun foo() : String? = ""
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class WrongMethodName : java.lang.Object {
|
||||
public constructor WrongMethodName()
|
||||
public open fun foo() : jet.String?
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package test;
|
||||
|
||||
import java.lang.Number;
|
||||
import java.util.*;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongProjectionKind {
|
||||
@ExpectLoadError("Projection kind mismatch, actual: out, in alternative signature: ")
|
||||
@KotlinSignature("fun copy(a : Array<out Number>, b : Array<Number>) : MutableList<Number>")
|
||||
public List<Number> copy(Number[] from, Number[] to) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongProjectionKind : Object() {
|
||||
public open fun copy(p0 : Array<out Number>?, p1 : Array<out Number>?) : MutableList<Number>? {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class WrongProjectionKind : java.lang.Object {
|
||||
public constructor WrongProjectionKind()
|
||||
public open fun copy(/*0*/ p0 : jet.Array<out jet.Number>?, /*1*/ p1 : jet.Array<out jet.Number>?) : jet.MutableList<jet.Number>?
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongReturnTypeStructure {
|
||||
@ExpectLoadError("'jet.String?' type in method signature has 0 type arguments, while 'String<Int>' in alternative signature has 1 of them")
|
||||
@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 @@
|
||||
package test
|
||||
|
||||
public open class WrongReturnTypeStructure : java.lang.Object {
|
||||
public constructor WrongReturnTypeStructure()
|
||||
public open fun foo(/*0*/ p0 : jet.String?, /*1*/ p1 : jet.List<jet.Map.Entry<jet.String, jet.String>>?) : jet.String?
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongTypeName1 {
|
||||
@ExpectLoadError("Alternative signature type mismatch, expected: jet.Tuple0, actual: jet.String")
|
||||
@KotlinSignature("fun foo(a : String) : Unit")
|
||||
public String foo(String a) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeName1 : Object() {
|
||||
public open fun foo(p0 : String?) : String? = ""
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class WrongTypeName1 : java.lang.Object {
|
||||
public constructor WrongTypeName1()
|
||||
public open fun foo(/*0*/ p0 : jet.String?) : jet.String?
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongTypeName2 {
|
||||
@ExpectLoadError("Alternative signature type mismatch, expected: Something.String, actual: jet.String")
|
||||
@KotlinSignature("fun foo(a : Something.String) : String")
|
||||
public String foo(String a) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeName2 : Object() {
|
||||
public open fun foo(p0 : String?) : String? = ""
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class WrongTypeName2 : java.lang.Object {
|
||||
public constructor WrongTypeName2()
|
||||
public open fun foo(/*0*/ p0 : jet.String?) : jet.String?
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongTypeName3 {
|
||||
@ExpectLoadError("Alternative signature type mismatch, expected: List, actual: jet.String")
|
||||
@KotlinSignature("fun foo(a : String) : List")
|
||||
public String foo(String a) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeName3 : Object() {
|
||||
public open fun foo(p0 : String?) : String? = ""
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class WrongTypeName3 : java.lang.Object {
|
||||
public constructor WrongTypeName3()
|
||||
public open fun foo(/*0*/ p0 : jet.String?) : jet.String?
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongTypeParameterBoundStructure1 {
|
||||
@ExpectLoadError("'java.lang.Runnable?' type in method signature has 0 type arguments, while 'Runnable<Int>' in alternative signature has 1 of them")
|
||||
@KotlinSignature("fun <A, B : Runnable<Int>> foo(a : A, b : List<B>) where B : List<Cloneable>")
|
||||
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b) {
|
||||
}
|
||||
}
|
||||
+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<B>?) where B : List<Cloneable>? {
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class WrongTypeParameterBoundStructure1 : java.lang.Object {
|
||||
public constructor WrongTypeParameterBoundStructure1()
|
||||
public open fun </*0*/ A, /*1*/ B> foo(/*0*/ p0 : A?, /*1*/ p1 : jet.List<B>?) : Unit where B : java.lang.Runnable?, B : jet.List<java.lang.Cloneable>?
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongTypeParameterBoundStructure2 {
|
||||
@ExpectLoadError("'jet.List<java.lang.Cloneable>?' type in method signature has 1 type arguments, while 'List' in alternative signature has 0 of them")
|
||||
@KotlinSignature("fun <A, B : Runnable> foo(a : A, b : List<B>) where B : List")
|
||||
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b) {
|
||||
}
|
||||
}
|
||||
+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<B>?) where B : List<Cloneable>? {
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class WrongTypeParameterBoundStructure2 : java.lang.Object {
|
||||
public constructor WrongTypeParameterBoundStructure2()
|
||||
public open fun </*0*/ A, /*1*/ B> foo(/*0*/ p0 : A?, /*1*/ p1 : jet.List<B>?) : Unit where B : java.lang.Runnable?, B : jet.List<java.lang.Cloneable>?
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongTypeParametersCount {
|
||||
@ExpectLoadError("Method signature has 2 type parameters, but alternative signature has 3")
|
||||
@KotlinSignature("fun <A, B, C> foo(a : A, b : List<B>)")
|
||||
public <A, B> void foo(A a, List<? extends B> b) {
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeParametersCount : Object() {
|
||||
public open fun <erased A, erased B> foo(p0 : A?, p1 : List<B>?) {
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class WrongTypeParametersCount : java.lang.Object {
|
||||
public constructor WrongTypeParametersCount()
|
||||
public open fun </*0*/ A, /*1*/ B> foo(/*0*/ p0 : A?, /*1*/ p1 : jet.List<B>?) : Unit
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongValueParameterStructure1 {
|
||||
@ExpectLoadError("'jet.String?' type in method signature has 0 type arguments, while 'String<Int?>' in alternative signature has 1 of them")
|
||||
@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 @@
|
||||
package test
|
||||
|
||||
public open class WrongValueParameterStructure1 : java.lang.Object {
|
||||
public constructor WrongValueParameterStructure1()
|
||||
public open fun foo(/*0*/ p0 : jet.String?, /*1*/ p1 : jet.List<jet.Map.Entry<jet.String, jet.String>>?) : jet.String?
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongValueParameterStructure2 {
|
||||
@ExpectLoadError("'jet.Map.Entry<jet.String, jet.String>' type in method signature has 2 type arguments, while 'Map.Entry<String?>' in alternative signature has 1 of them")
|
||||
@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 @@
|
||||
package test
|
||||
|
||||
public open class WrongValueParameterStructure2 : java.lang.Object {
|
||||
public constructor WrongValueParameterStructure2()
|
||||
public open fun foo(/*0*/ p0 : jet.String?, /*1*/ p1 : jet.List<jet.Map.Entry<jet.String, jet.String>>?) : jet.String?
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package test;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongValueParametersCount {
|
||||
@ExpectLoadError("Method signature has 0 value parameters, but alternative signature has 1")
|
||||
@KotlinSignature("fun foo(a : Int) : Int")
|
||||
public Integer foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class WrongValueParametersCount : Object() {
|
||||
public open fun foo() : Int? {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class WrongValueParametersCount : java.lang.Object {
|
||||
public constructor WrongValueParametersCount()
|
||||
public open fun foo() : jet.Int?
|
||||
}
|
||||
Reference in New Issue
Block a user