[CP] Bugfix for web DateTime, to 2.19 #50821
Labels
cherry-pick-approved
Label for approved cherrypick request
cherry-pick-review
Issue that need cherry pick triage to approve
merge-to-beta
Commit(s) to merge
8ad7661
Target
beta
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/277002
Issue Description
A use of a private variable, instead of the public getter exposing it, made the web
DateTime
classes incompatible with custom implementations. Combined with the 2.19 language change of not forwarding implicit implementations of inaccessible members tonoSuchMethod
, means that existing workarounds usingnoSuchMethod
also won't work.See #50750 for an issue where the problem arose.
What is the fix
Just read the
millisecondsSinceEpoch
using the public getter instead of the private field.Why cherry-pick
Existing code is broken with no workaround. They'd like the fix to be available along with the language change that breaks the existing workaround.
Risk
low
Issue link(s)
#50750
Extra Info
No response
The text was updated successfully, but these errors were encountered: