An enum
holds different members that map to different values. In most languages, it is usually expected that these members map to unique values. However, in this case, one or more members map to a value that was already associated with a different member. This could likely be a mistake and greatly affect your program's logic and behaviour. It is recommended that you review all the values associated with this enum's members.
enum Constant(d: Double) {
case E extends Constant(2.7182)
case Pi extends Constant(3.1415)
case Tau extends Constant(3.1415) // Duplicated value
}
enum Constant(d: Double) {
case E extends Constant(2.7182)
case Pi extends Constant(3.1415)
case Tau extends Constant(6.2831) // Fixed
}