fix #854: keep classmember enums

fix #854: keep classmember enums