mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 10:18:13 +00:00
Remove extra hashCode in Object.hash().
Change-Id: Ifad348ae035dd69764c3264b7ddfd8036bc1dc54 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216763 Reviewed-by: Samuel Rawlins <srawlins@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
fa50b7e5d1
commit
7e717e3ff7
|
@ -22,7 +22,7 @@ class ClassMemberReference {
|
|||
final int hashCode;
|
||||
|
||||
ClassMemberReference(this.target, this.name)
|
||||
: hashCode = Object.hash(target.hashCode, name.hashCode);
|
||||
: hashCode = Object.hash(target, name);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
|
@ -120,7 +120,7 @@ class LibraryQualifiedName {
|
|||
|
||||
factory LibraryQualifiedName(Uri libraryUri, String name) {
|
||||
var isPrivate = name.startsWith('_');
|
||||
var hashCode = Object.hash(libraryUri.hashCode, name.hashCode);
|
||||
var hashCode = Object.hash(libraryUri, name);
|
||||
return LibraryQualifiedName._internal(
|
||||
libraryUri, name, isPrivate, hashCode);
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ class DartObjectImpl implements DartObject {
|
|||
Map<String, DartObjectImpl>? get fields => _state.fields;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(type.hashCode, _state.hashCode);
|
||||
int get hashCode => Object.hash(type, _state);
|
||||
|
||||
@override
|
||||
bool get hasKnownValue => !_state.isUnknown;
|
||||
|
|
|
@ -884,7 +884,7 @@ class Name {
|
|||
|
||||
factory Name(Uri? libraryUri, String name) {
|
||||
if (name.startsWith('_')) {
|
||||
var hashCode = Object.hash(libraryUri.hashCode, name.hashCode);
|
||||
var hashCode = Object.hash(libraryUri, name);
|
||||
return Name._internal(libraryUri, name, false, hashCode);
|
||||
} else {
|
||||
return Name._internal(null, name, true, name.hashCode);
|
||||
|
|
|
@ -51,7 +51,7 @@ class _FixReasonTarget_NamedParameter extends _FixReasonTarget_Part {
|
|||
: super(inner);
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(2, inner.hashCode, name.hashCode);
|
||||
int get hashCode => Object.hash(2, inner, name);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
|
@ -80,7 +80,7 @@ class _FixReasonTarget_PositionalParameter extends _FixReasonTarget_Part {
|
|||
: super(inner);
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(1, inner.hashCode, index);
|
||||
int get hashCode => Object.hash(1, inner, index);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
|
@ -98,7 +98,7 @@ class _FixReasonTarget_ReturnType extends _FixReasonTarget_Part {
|
|||
_FixReasonTarget_ReturnType(FixReasonTarget inner) : super(inner);
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(3, inner.hashCode);
|
||||
int get hashCode => Object.hash(3, inner);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
|
@ -131,7 +131,7 @@ class _FixReasonTarget_TypeArgument extends _FixReasonTarget_Part {
|
|||
: super(inner);
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(5, inner.hashCode, index);
|
||||
int get hashCode => Object.hash(5, inner, index);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
|
@ -162,7 +162,7 @@ class _FixReasonTarget_YieldedType extends _FixReasonTarget_Part {
|
|||
_FixReasonTarget_YieldedType(FixReasonTarget inner) : super(inner);
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(4, inner.hashCode);
|
||||
int get hashCode => Object.hash(4, inner);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
|
|
|
@ -142,7 +142,7 @@ class NavigationTarget extends NavigationRegion {
|
|||
: super(offset, line, length);
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(filePath.hashCode, offset, length);
|
||||
int get hashCode => Object.hash(filePath, offset, length);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
|
|
Loading…
Reference in a new issue