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

Remove unused field, triggering a compiler warning #300

Merged
merged 2 commits into from
Dec 7, 2024

Conversation

jmid
Copy link
Collaborator

@jmid jmid commented Dec 6, 2024

This PR removes an unused field causing an annoying compiler warning:

$ dune build
File "src/core/QCheck2.ml", line 1172, characters 2-20:
1172 |   fun_gen: 'b Gen.t; (** How to generate output values *)
         ^^^^^^^^^^^^^^^^^^
Warning 69 [unused-field]: record field fun_gen is never read.
(However, this field is used to build or mutate values.)
File "src/core/QCheck2.ml", line 1172, characters 2-20:
1172 |   fun_gen: 'b Gen.t; (** How to generate output values *)
         ^^^^^^^^^^^^^^^^^^
Warning 69 [unused-field]: record field fun_gen is never read.
(However, this field is used to build or mutate values.)

Note: The removed code is not visible in the QCheck2 interface and the change is thereby invisible to end-users.
With this PR QCheck now compiles cleanly (silently) on 5.2.

Removing code without affecting features is a pleasure... 😄

@jmid jmid merged commit 9847d5d into c-cube:main Dec 7, 2024
13 checks passed
@jmid jmid deleted the rm-unused-field branch December 7, 2024 11:17
@jmid jmid mentioned this pull request Dec 7, 2024
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 this pull request may close these issues.

1 participant