stage2: fix generic function cleanup

When removing generic function instantiations from monomorphed_funcs, we
need to first make sure the function is generic, otherwise the hash map
tries to access the `hash` field of the function which is undefined.

closes #12614
af19909b9cAndrew Kelley committed on 8/24/2022, 11:47:58 PMparentf4980a4
1 file changedLine totals unavailable