[dartdevc] Fix analysis error in dart:collection patch file

If hashcode is null it gets set on line 128 to dart.hashcode which
is a top level method in the dart:_runtime library.

Change-Id: Ib26a70dc84305dfa11eb15206abd36f003adcd9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137401
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
Nicholas Shahan 2020-02-27 01:19:14 +00:00 committed by commit-bot@chromium.org
parent 9e4000e44b
commit 4017a5ca7c
2 changed files with 1 additions and 3 deletions

View file

@ -173,6 +173,5 @@ ERROR|STATIC_WARNING|FINAL_NOT_INITIALIZED|lib/web_gl/dart2js/web_gl_dart2js.dar
WARNING|STATIC_WARNING|DEAD_NULL_AWARE_EXPRESSION|lib/_http/http.dart|1476|39|5|The left operand can't be null, so the right operand is never executed.
WARNING|STATIC_WARNING|DEAD_NULL_AWARE_EXPRESSION|lib/_http/http.dart|8384|60|5|The left operand can't be null, so the right operand is never executed.
WARNING|STATIC_WARNING|DEAD_NULL_AWARE_EXPRESSION|lib/_http/http.dart|9311|54|5|The left operand can't be null, so the right operand is never executed.
WARNING|STATIC_WARNING|DEAD_NULL_AWARE_EXPRESSION|lib/collection/collection.dart|1076|46|13|The left operand can't be null, so the right operand is never executed.
WARNING|STATIC_WARNING|DEAD_NULL_AWARE_EXPRESSION|lib/developer/developer.dart|332|25|23|The left operand can't be null, so the right operand is never executed.
WARNING|STATIC_WARNING|DEAD_NULL_AWARE_EXPRESSION|lib/io/io.dart|9188|16|1|The left operand can't be null, so the right operand is never executed.

View file

@ -130,8 +130,7 @@ class LinkedHashSet<E> {
identical(identical, equals)) {
return _IdentityHashSet<E>();
}
return _CustomHashSet<E>(
equals ?? dart.equals, hashCode ?? dart.hashCode);
return _CustomHashSet<E>(equals ?? dart.equals, hashCode);
}
return _CustomKeyHashSet<E>(
equals ?? dart.equals, hashCode ?? dart.hashCode, isValidKey);