fix Issue 10142 - enum value semantic problem that declared in class member