Skip to content

a doubt about hashCode of Value #18

Description

@cydonialis

current implementation of Value's hashCode is:
public int hashCode() { return value; }
but this will result in
Value.makeConstant(0).hashCode() equals Value.getNAC().hashCode() and Value.getUndef().hashCode()

and thus a hashCode of CPFact's instance may not changed when a Value changed.

an optional implementation
public int hashCode() { return toString().hashCode(); }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions