How do I use enum values when their type is defined indirectly in another unit?
问题 I am trying to reduce the number of Uses and am running into problems with Enums (* original unit, where types are defined etc *) unit unit1; type TSomeEnumType = (setValue1, setValue2, ...); ... (* global unit where all types are linked *) unit unit2; uses unit1; type TSomeEnumType = unit1.TSomeEnumType; ... (* form unit that will use the global unit *) unit unitform; uses unit2; ... procedure FormCreate(Sender : TObject); var ATypeTest : TSomeEnumType; begin ATypeTest := setValue1; (* error