Skip to content
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

Bug: type 'int' is not a subtype of type 'double' on self_destruct_in #3

Closed
AndrewTran2018 opened this issue Apr 10, 2023 · 5 comments

Comments

@AndrewTran2018
Copy link

type 'int' is not a subtype of type 'double'
E/flutter ( 6346): #0 Message.fromJson (package:tdlib/src/api/objects/message.dart:242:27)
E/flutter ( 6346): #1 ConvertExtensions.toTdObject (package:tdlib/src/api/extensions/convert_extensions.dart:1

@AndrewTran2018
Copy link
Author

There are still a lot of bugs related to number conversion including int and double like this one. I fixed some, but to ensure its reliability please recheck and improve your code generator. I'm sick of these kinds of issues

@AndrewTran2018
Copy link
Author

@ivk1800

@ivk1800
Copy link
Owner

ivk1800 commented Apr 10, 2023

There are steps to reproduce? selfDestructIn(self_destruct_in) is double in td_api.tl

What is value of selfDestructIn ? can you provider json example of message object?

@AndrewTran2018
Copy link
Author

There are steps to reproduce? selfDestructIn(self_destruct_in) is double in td_api.tl

What is value of selfDestructIn ? can you provider json example of message object

selfDetructIn is int in this case. That's why the line : selfDestructIn: json['self_destruct_in'] causes a crash.

@ivk1800
Copy link
Owner

ivk1800 commented Apr 11, 2023

Fixed d5ed66a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants