Closed
Description
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
andUtClassRefModel
should be subtypes ofUtReferenceModel
.- The address assigned to a
UtEnumConstantModel
should be equal to one and only one address assigned to models of the static fields of the correspondingEnum
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.
Metadata
Metadata
Assignees
Type
Projects
Status
Done