[FIR] Fix type constraint for type parameter ^KT-45345 Fixed

This commit is contained in:
Ivan Kochurkin
2021-10-06 21:48:56 +03:00
parent a0fb60f201
commit 2e1f455d9c
9 changed files with 69 additions and 30 deletions
@@ -1,6 +1,6 @@
// !LANGUAGE: +NewInference
inline fun <T, reified S> foo(x: T?, y: T): T {
if (x is S) return x
if (x is S) return <!RETURN_TYPE_MISMATCH!>x<!>
return y
}