Fixed rendering of error message for 'cannot capture type' error
Type variable should be chosen correctly
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// !DIAGNOSTICS_NUMBER: 1
|
||||
// !DIAGNOSTICS: TYPE_INFERENCE_CANNOT_CAPTURE_TYPES
|
||||
|
||||
class My<R, T>
|
||||
|
||||
fun <R, T> foo(my: My<Array<R>, T>): My<Array<R>, T> = my
|
||||
|
||||
fun test11(my: My<Array<out Int>, out Int>) {
|
||||
foo(my)
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- typeInferenceCannotCaptureTypes1 -->
|
||||
Type inference failed: 'R' cannot capture 'out Int'. Only top-level type projections can be captured
|
||||
Reference in New Issue
Block a user