ivk1800/tdlib-dart

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

Closed this issue · 5 comments

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

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

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?

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.

Fixed d5ed66a