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

Bad state: No serializer for 'CastList<dynamic, String>'. #1017

Closed
elvisun opened this issue Mar 29, 2021 · 1 comment
Closed

Bad state: No serializer for 'CastList<dynamic, String>'. #1017

elvisun opened this issue Mar 29, 2021 · 1 comment
Assignees

Comments

@elvisun
Copy link

elvisun commented Mar 29, 2021

Serialization fails for the following code:

abstract class M implements Built<M, MBuilder> {
  List<String> get categories;

  static Serializer<M> get serializer =>
      _$mSerializer;
}

Error message is:

Bad state: No serializer for 'CastList<dynamic, String>'.

Once I changed the List<String> to BuiltList<String> it worked, is this the proper solution? Can we surface a better error message?

@davidmorgan davidmorgan self-assigned this Mar 29, 2021
@davidmorgan
Copy link
Collaborator

Sorry about that.

It's because of #675 ... the generator is actually supposed to stop you using List altogether, but that check broke and is a little hard to reland. I'll try to prioritize that.

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