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

Incorrect spec for json:format/3 #8880

Closed
isvilen opened this issue Oct 2, 2024 · 1 comment
Closed

Incorrect spec for json:format/3 #8880

isvilen opened this issue Oct 2, 2024 · 1 comment
Assignees
Labels
bug Issue is reported as a bug team:PS Assigned to OTP team PS
Milestone

Comments

@isvilen
Copy link
Contributor

isvilen commented Oct 2, 2024

Describe the bug
json:format/3 has spec -spec format(Term :: encode_value(), Encoder::formatter(), Options :: map()) -> iodata().,
but this causes dialyzer errors because first argument Term can be any user specific type supported by Encoder function.

Expected behavior
Spec for json:format/3 to be -spec format(Term :: dynamic(), Encoder::formatter(), Options :: map()) -> iodata()..

Affected versions
27.1.

@isvilen isvilen added the bug Issue is reported as a bug label Oct 2, 2024
@dgud dgud self-assigned this Oct 2, 2024
@IngelaAndin IngelaAndin added the team:PS Assigned to OTP team PS label Oct 2, 2024
dgud added a commit that referenced this issue Oct 10, 2024
* dgud/stdlib/fix-spec/GH-8880/OTP-19286:
  Fix spec for json:format/3
@dgud dgud added this to the OTP-27.1.2 milestone Oct 11, 2024
@dgud
Copy link
Contributor

dgud commented Oct 12, 2024

Fix merged, will be in next patch release.

@dgud dgud closed this as completed Oct 12, 2024
jhogberg pushed a commit that referenced this issue Oct 17, 2024
* dgud/stdlib/fix-spec/GH-8880/OTP-19286:
  Fix spec for json:format/3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:PS Assigned to OTP team PS
Projects
None yet
Development

No branches or pull requests

3 participants