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

Dialyzer error with Duration #700

Closed
oliver-kriska opened this issue Aug 6, 2024 · 2 comments · Fixed by #701
Closed

Dialyzer error with Duration #700

oliver-kriska opened this issue Aug 6, 2024 · 2 comments · Fixed by #701
Labels

Comments

@oliver-kriska
Copy link

Elixir version

1.17.2-otp-27

Database and Version

PostgreSQL 16

Postgrex Version

0.19.0

Current behavior

error is

deps/postgrex/lib/postgrex/type_module.ex:1084:pattern_match
The pattern can never match the type.

Pattern:
Duration

Type:
Postgrex.Interval

Expected behavior

I suspect that this doesn't work correctly but no idea how to fix it
https://github.com/elixir-ecto/postgrex/blob/master/lib/postgrex/extensions/interval.ex#L58

@greg-rychlewski
Copy link
Member

@oliver-kriska Thanks for the report. Could you please try the latest commit on this repo to confirm it solves your issue?

@oliver-kriska
Copy link
Author

@greg-rychlewski didn't help or another issue:

deps/postgrex/lib/postgrex/type_module.ex:1084:call
The function call will not succeed.

:erlang.band(_mod :: nil, 65535)

will never return since the 1st arguments differ
from the success typing arguments:

(integer(), integer())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants