mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 13:28:03 +00:00
Remove invalid inequal tear-off hash code test
`hashCode` requires that equal objects have the same hash code. However it doesn't (and cannot) require that inequal objects have different hash codes. Remove the invalid check. This makes the test pass on dart2wasm, which currently implements closure hash code as: // Simple hash code for now, we can optimize later @override int get hashCode => runtimeType.hashCode; Note: this change alone does not make the whole file pass with dart2wasm, there's another (unrelated) issue which will be fixed separately. Change-Id: Ibc83aee13fdbe48d1b2f7d8e720766b455c6b930 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286783 Commit-Queue: Ömer Ağacan <omersa@google.com> Reviewed-by: Erik Ernst <eernst@google.com>
This commit is contained in:
parent
cc736dfb65
commit
8dbf923e89
|
@ -21,7 +21,6 @@ tearoffEquals(f1, f2) {
|
|||
|
||||
tearoffNotEquals(f1, f2) {
|
||||
Expect.notEquals(f1, f2);
|
||||
Expect.notEquals(f1.hashCode, f2.hashCode);
|
||||
}
|
||||
|
||||
testDynamic() {
|
||||
|
|
Loading…
Reference in a new issue