Description
Although Enum is a reference type, UtEnumConstantModel is not currently a subtype of UtReferenceModel and does not have any id that would allow the reference comparison of Enum values. As a result, we can't use Enum values as elements of generic collections (Map<K, V>, List<E> etc).
The intended solution:
UtEnumConstantModel and UtClassRefModel should be subtypes of UtReferenceModel.
- The address assigned to a
UtEnumConstantModel should be equal to one and only one address assigned to models of the static fields of the corresponding Enum class, and reference equality must hold.
- The addresses should be assigned to
UtClassRefModel with respect to class equality condition: all models of the same class should have the same address, models of different classes should have different addresses,
Related issue: #230
Expected behavior
UtEnumConstantModel is a subtype of UtReferenceModel, and enum values can be used as elements of any generic collection.
Environment
The intended behavior does not depend on any specific environment.
Description
Although
Enumis a reference type,UtEnumConstantModelis not currently a subtype ofUtReferenceModeland does not have anyidthat would allow the reference comparison ofEnumvalues. As a result, we can't useEnumvalues as elements of generic collections (Map<K, V>,List<E>etc).The intended solution:
UtEnumConstantModelandUtClassRefModelshould be subtypes ofUtReferenceModel.UtEnumConstantModelshould be equal to one and only one address assigned to models of the static fields of the correspondingEnumclass, and reference equality must hold.UtClassRefModelwith respect to class equality condition: all models of the same class should have the same address, models of different classes should have different addresses,Related issue: #230
Expected behavior
UtEnumConstantModelis a subtype ofUtReferenceModel, and enum values can be used as elements of any generic collection.Environment
The intended behavior does not depend on any specific environment.