All bounds may be specified in 'where' clause

Exception fixed in AlternativeMethodSignatureData
This commit is contained in:
Andrey Breslav
2014-05-13 18:21:35 +04:00
parent 788994283e
commit 3a9f577d1d
8 changed files with 80 additions and 49 deletions

View File

@@ -0,0 +1,12 @@
package test;
import jet.runtime.typeinfo.KotlinSignature;
import java.io.Serializable;
public class AllBoundsInWhen {
@KotlinSignature("fun <T> foo() where T: Serializable")
public <T extends Serializable> void foo() {
throw new UnsupportedOperationException();
}
}

View File

@@ -0,0 +1,9 @@
package test
import java.io.Serializable
public open class AllBoundsInWhen : Object() {
public open fun <T> foo() where T: Serializable {
throw UnsupportedOperationException()
}
}

View File

@@ -0,0 +1,6 @@
package test
public open class AllBoundsInWhen : java.lang.Object {
public constructor AllBoundsInWhen()
public open fun </*0*/ T : java.io.Serializable> foo(): kotlin.Unit
}

View File

@@ -4,7 +4,7 @@ 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")
@ExpectLoadError("Upper bound number mismatch for A. Expected 1, but found 2")
@KotlinSignature("fun <A : Runnable> foo() : String where A : Cloneable")
public <A extends Runnable> String foo() {
throw new UnsupportedOperationException();

View File

@@ -4,7 +4,7 @@ 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")
@ExpectLoadError("Upper bound number mismatch for A. Expected 2, but found 1")
@KotlinSignature("fun <A : Runnable> foo() : String")
public <A extends Runnable & Cloneable> String foo() {
throw new UnsupportedOperationException();