fix issue 10505 - anonymous enum members cannot have different types