Skip to content

HashCode of enum cases is not stableΒ #19177

Closed
@Lasering

Description

@Lasering

Compiler version

3.3.1

Minimized code

enum Test:
  case A

Test.A.hashCode

Scastie

Output

The outputted value changes for each run. Most likely the hashCode is being computed from the memory position.

Expectation

The hashCode should be stable across multiple JVMs.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions