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

A warning is triggered when defining StateLenses with a single field #19

Closed
synaptiko opened this issue Feb 24, 2020 · 0 comments · Fixed by #27
Closed

A warning is triggered when defining StateLenses with a single field #19

synaptiko opened this issue Feb 24, 2020 · 0 comments · Fixed by #27

Comments

@synaptiko
Copy link

Here's an example:

module StateLenses = [%lenses type state = { isChecked: bool }];

The warning will be:

  Warning number 23
  (No file name)

  All the fields are already explicitly listed in this record. You can remove the `...` spread.

It's not obvious where the problem is until you check the code generated by PPX where spread is used in the generated setter.

@synaptiko synaptiko changed the title When defining StateLenses with a single field a warning is triggered A warning is triggered when defining StateLenses with a single field Feb 24, 2020
@fakenickels fakenickels mentioned this issue Aug 6, 2020
5 tasks
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

Successfully merging a pull request may close this issue.

1 participant