2a68e31ffb
The language spec only mandates operator== to not be overridden for instances used in const maps as keys or const sets. However, hashCode _can_ be overridden. This adds a test that exercises this behavior. Bug: https://github.com/dart-lang/sdk/issues/45908 Change-Id: Id64c0722872bb916963b71057a06309bf3b8b559 Cq-Include-Trybots: luci.dart.try:dart2js-csp-minified-linux-x64-chrome-try,dart2js-minified-strong-linux-x64-d8-try,dart2js-nnbd-linux-x64-chrome-try,dart2js-strong-hostasserts-linux-ia32-d8-try,dart2js-strong-linux-x64-chrome-try,dart2js-strong-linux-x64-firefox-try,dart2js-strong-mac-x64-chrome-try,dart2js-strong-mac-x64-safari-try,dart2js-strong-win-x64-chrome-try,dart2js-unit-linux-x64-release-try,ddc-linux-release-chrome-try,ddc-mac-release-chrome-try,ddc-nnbd-linux-release-chrome-try,ddc-win-release-chrome-try,vm-kernel-precomp-nnbd-linux-debug-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206085 Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.