CoroutineTransformerMethodVisitor: fix potential type mismatch

The fixed code compiles properly only due to null smart cast.
Without it, e.g. in FIR, we'd have type mismatch error for this return.
This commit is contained in:
Mikhail Glukhikh
2021-04-09 18:33:18 +03:00
parent 69d1ef423a
commit f7147dc6f3
@@ -999,7 +999,7 @@ class CoroutineTransformerMethodVisitor(
else -> next = next.next
}
}
return next
return null
}
// It's necessary to preserve some sensible invariants like there should be no jump in the middle of try-catch-block