Every time I run into an issue with dialyzer, it’s my fault. I respect that, and predict that it’s also the case here. I’m stumped with this one, though.
I’m using a with statement that may return two different matches. I use this same with statement twice. In one of the statements, dialyzer only sees the return values from one of the function calls.
If anyone has some spare moments to take a look at the code, I’d appreciate any pointers.
lib/dyd.ex:101:pattern_match
The pattern can never match the type.
Pattern:
{:error, {:invalid_toml, _error}}
Type:
{:error, :invalid_time_unit | :not_a_datetime}
Here is the offending line, pinned to a specific commit:
Here is the second usage, which does not generate any warnings:
Here is the spec that should make the statement valid: