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
passing a list type List<SomeOne> instead of SomeOne as the return type for the call generates the following function (the return type is not detected and InvalidType is used):
Notice: Passing the super type "Some" instead of "SomeOne" or "SomeTwo" is not a problem but also not a solution as this would be the wrong return type.
Expected behavior
I would expect that the code generator generates a working code with the defined type as long as it is json-serializable.
The text was updated successfully, but these errors were encountered:
Describe the bug
Subclasses generated with Freezed are detected as InvalidType or crashing the code generator
To Reproduce
Having a freezed class like this:
And a Retrofit class like this:
will break the generator with a line
package:source_gen/src/type_checker.dart 215:74 TypeChecker.isSuperTypeOf
passing a list type
List<SomeOne>
instead ofSomeOne
as the return type for the call generates the following function (the return type is not detected andInvalidType
is used):Notice: Passing the super type "Some" instead of "SomeOne" or "SomeTwo" is not a problem but also not a solution as this would be the wrong return type.
Expected behavior
I would expect that the code generator generates a working code with the defined type as long as it is json-serializable.
The text was updated successfully, but these errors were encountered: