mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
Use identical() instead of == for elements in RuntimeTypeEqualityVisitor.
See https://github.com/dart-lang/mockito/issues/658#issuecomment-1615269018 Change-Id: I5b9e4b1d82ec935bcd2097ec76cf5a8e28c5e29e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312205 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com>
This commit is contained in:
parent
44a94e8400
commit
d4de535a3a
|
@ -88,7 +88,7 @@ class RuntimeTypeEqualityVisitor
|
|||
@override
|
||||
bool visitInterfaceType(InterfaceType T1, DartType T2) {
|
||||
if (T2 is InterfaceType &&
|
||||
T1.element == T2.element &&
|
||||
identical(T1.element, T2.element) &&
|
||||
_compatibleNullability(T1, T2)) {
|
||||
var T1_typeArguments = T1.typeArguments;
|
||||
var T2_typeArguments = T2.typeArguments;
|
||||
|
@ -167,7 +167,7 @@ class RuntimeTypeEqualityVisitor
|
|||
bool visitTypeParameterType(TypeParameterType T1, DartType T2) {
|
||||
return T2 is TypeParameterType &&
|
||||
_compatibleNullability(T1, T2) &&
|
||||
T1.element == T2.element;
|
||||
identical(T1.element, T2.element);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
Loading…
Reference in a new issue