Solve the constraint system for alpha-converted variables,
store initial and backward conversions for substituting new constraints and the result
This commit is contained in:
@@ -15,6 +15,6 @@ class C<X, Z, Y : X>
|
||||
|
||||
class D<X, Z, Y : X>(<!UNUSED_PARAMETER!>foo<!>: C<X, Z, Y>) {
|
||||
fun test(a: C<Y, Y, Y>) {
|
||||
val d: D<X, Y, Y> = <!TYPE_MISMATCH!>D(a)<!>
|
||||
val d: D<X, Y, Y> = <!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH!>D<!>(a)
|
||||
}
|
||||
}
|
||||
Vendored
+2
-2
@@ -17,8 +17,8 @@ fun test(out: Out<Int>, i: In<Int>, inv: A<Int>) {
|
||||
r checkType { _<Int>() }
|
||||
|
||||
// T? <: Int => error
|
||||
doIn(<!TYPE_MISMATCH!>i<!>)
|
||||
<!TYPE_INFERENCE_INCORPORATION_ERROR!>doIn<!>(<!TYPE_MISMATCH!>i<!>)
|
||||
|
||||
// T? >: Int => error
|
||||
doA(<!TYPE_MISMATCH!>inv<!>)
|
||||
<!TYPE_INFERENCE_INCORPORATION_ERROR!>doA<!>(<!TYPE_MISMATCH!>inv<!>)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user