Fixed a bug in typeswitch with function pointers