forked from localvoid/timezone
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DateTime comparison with TZDateTime throws NoSuchMethodError #10
Labels
blocked
The issue is blocked by another issue
Comments
More specifically, this is blocked by dart-lang/sdk#32051. |
this is still an issue |
While the final fix from DART does not come, I've created this extension to help:
PS it works perfect to work around this bug, I changed the |
dart-lang/sdk#32051 is closed as fixed, and I do not see a stack trace any longer. I believe this is fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following line of code will cause a runtime error:
new DateTime.now().isAfter(new TZDateTime.now(UTC))
The error:
This happens because DateTime.isAfter is using a private value
_value
to do the comparison but since TZDateTime only implements the interface, it has no privates that would be accessible. As mentioned in dart-lang/sdk#25462 there's not much this library can do about it since it's a language level problem which won't be caught by any compiler.The text was updated successfully, but these errors were encountered: