diff --git a/lib/src/note/positioned_note.dart b/lib/src/note/positioned_note.dart index 69383d80..a330bae9 100644 --- a/lib/src/note/positioned_note.dart +++ b/lib/src/note/positioned_note.dart @@ -163,7 +163,7 @@ final class PositionedNote other is PositionedNote && note == other.note && octave == other.octave; @override - int get hashCode => Object.hash(super.hashCode, octave); + int get hashCode => Object.hash(note, octave); @override int compareTo(PositionedNote other) => compareMultiple([ diff --git a/test/src/note/positioned_note_test.dart b/test/src/note/positioned_note_test.dart index d5a4eaa8..f7545453 100644 --- a/test/src/note/positioned_note_test.dart +++ b/test/src/note/positioned_note_test.dart @@ -694,12 +694,14 @@ void main() { final collection = { Note.c.inOctave(4), Note.a.flat.inOctave(2), + Note.d.inOctave(4), Note.g.sharp.inOctave(5), }; collection.addAll(collection); expect(collection.toList(), [ Note.c.inOctave(4), Note.a.flat.inOctave(2), + Note.d.inOctave(4), Note.g.sharp.inOctave(5), ]); });