Test data adjustment: JetDiagnosticsTest
This commit is contained in:
+6
-2
@@ -1,5 +1,9 @@
|
|||||||
val flag = true
|
val flag = true
|
||||||
|
|
||||||
val a/*: () -> Comparable<out Any?>*/ = l@ {
|
interface I
|
||||||
return@l if (flag) "OK" else 4
|
class A(): I
|
||||||
|
class B(): I
|
||||||
|
|
||||||
|
val a = l@ {
|
||||||
|
return@l if (flag) A() else B()
|
||||||
}
|
}
|
||||||
+21
-1
@@ -1,4 +1,24 @@
|
|||||||
package
|
package
|
||||||
|
|
||||||
public val a: () -> kotlin.Comparable<out kotlin.Any?>
|
public val a: () -> I
|
||||||
public val flag: kotlin.Boolean = true
|
public val flag: kotlin.Boolean = true
|
||||||
|
|
||||||
|
public final class A : I {
|
||||||
|
public constructor A()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class B : I {
|
||||||
|
public constructor B()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I {
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ fun test1() {
|
|||||||
|
|
||||||
val i = both(1, "")
|
val i = both(1, "")
|
||||||
val j = both(id(1), id(""))
|
val j = both(id(1), id(""))
|
||||||
checkSubtype<Comparable<*>>(i)
|
checkSubtype<Any>(i)
|
||||||
checkSubtype<Comparable<*>>(j)
|
checkSubtype<Any>(j)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun list<T>(value: T) : ArrayList<T> {
|
fun list<T>(value: T) : ArrayList<T> {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ fun test() {
|
|||||||
<!TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR!>otherGeneric<!>(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
<!TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR!>otherGeneric<!>(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
||||||
|
|
||||||
val r = either(1, "")
|
val r = either(1, "")
|
||||||
r checkType { _<Comparable<*>>() }
|
r checkType { _<Any>() }
|
||||||
|
|
||||||
use(a, b, c, d, e, f, g, r)
|
use(a, b, c, d, e, f, g, r)
|
||||||
}
|
}
|
||||||
@@ -56,7 +56,7 @@ fun <T> lowerBound(t: T, l : Cov<T>): T = throw Exception("$t $l")
|
|||||||
|
|
||||||
fun testLowerBound(cov: Cov<String>, covN: Cov<Number>) {
|
fun testLowerBound(cov: Cov<String>, covN: Cov<Number>) {
|
||||||
val r = lowerBound(1, cov)
|
val r = lowerBound(1, cov)
|
||||||
r checkType { _<Comparable<*>>() }
|
r checkType { _<Any>() }
|
||||||
|
|
||||||
val n = lowerBound(1, covN)
|
val n = lowerBound(1, covN)
|
||||||
n checkType { _<Number>() }
|
n checkType { _<Number>() }
|
||||||
|
|||||||
Reference in New Issue
Block a user