package:vm_service Isolate is mutable yet overrides operator == #47347
Labels
area-pkg
Used for miscellaneous pkg/ packages not associated with specific area- teams.
pkg-vm-service
The
Isolate
class is mutable (e.g.pauseEvent
), but has anoperator ==
. This means that it is possible for two instances ofIsolate
to compare equal, yet behave differently. This is a potential source of bugs, for example consider if instances of this class are used in aSet
or as a key to aMap
: the object added to the set or map will not be the same as the object obtained back from the same set or map when iterating over the set or map keys.The text was updated successfully, but these errors were encountered: