fix #789 broken type for `process` and other anon class refs