fix function super type derivation