Fix return type assertions & arrow functions

Fixes #1443