Open MarkoMin opened 10 months ago
Yes this is a false positive, thank you for reporting it.
This is a known issue in eqWAlizer's handling of pattern matching: it currently does not refine the type of variables bound to a pattern using Pat = Var
, so here, the type of Group
is not properly refined to the case #{id:=binary(), elements:=list(elem())}
.
Our current implementation of occurrence typing makes it non-trivial to support, but we're exploring possible solutions.
I've noticed what I believe is false positive and shrank it down to the minimal example:
Program goes through tree-like struct and places error in each leaf node. When I eqwalize it, I get the following error message:
If
Group
is of typeelem()
and I update one of the field that already exist in it, should the expression remain of typeelem()
?I use OTP 26.1, latest eqwalizer (ref "41869ab6eb30e9ff34545fe5f9c0a4caa797cfc2") and elp 1.1.0+build-2023-08-31