mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
All bounds may be specified in 'where' clause
Exception fixed in AlternativeMethodSignatureData
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user