You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under some conditions, the hashcode of a generic type shows up as 0, and non-zero from an equal (but not identical) type. Occurred on Android (10 and 12 but not 6.0.1), but not on Linux native, nor on Chrome. May be related to #45060 - I even discovered the problem under similar circumstances.
Under some conditions, the hashcode of a generic type shows up as 0, and non-zero from an equal (but not identical) type. Occurred on Android (10 and 12 but not 6.0.1), but not on Linux native, nor on Chrome. May be related to #45060 - I even discovered the problem under similar circumstances.
Here's code to demonstrate it:
This gives e.g.
As you can see, all forms are equal to
Foo<Bar>
, butFoo<T>
(whereT
is set toBar
) has a different hashcode, namely 0.Tried this on two computers...actually, now I have one Android phone where it works right and two where it doesn't. Uh, here's a table of things:
Flutter 3.3.0-0.2.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 7ac27ac8e6 (13 days ago) • 2022-08-02 14:35:08 -0700
Engine • revision d1e7dc18bf
Tools • Dart 2.18.0 (build 2.18.0-271.4.beta) • DevTools 2.15.0
:
Android 12 - bug
:
:
:
Flutter 3.0.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f1875d570e (5 weeks ago) • 2022-07-13 11:24:16 -0700
Engine • revision e85ea0e79c
Tools • Dart 2.17.6 • DevTools 2.12.2
:
Android 10 - bug
Android 12 - bug
Android 6.0.1 - correct
Linux desktop (Ubuntu 20.04.4 64bit) - correct
Chrome 102.0.5005.115 64bit - correct
The text was updated successfully, but these errors were encountered: