Skip to content

Add OTP 28 Dialyzer warning support (exact_compare, opaque_compare, opaque_union)#591

Open
bawolf wants to merge 3 commits intojeremyjh:masterfrom
bawolf:bw/exact-compare
Open

Add OTP 28 Dialyzer warning support (exact_compare, opaque_compare, opaque_union)#591
bawolf wants to merge 3 commits intojeremyjh:masterfrom
bawolf:bw/exact-compare

Conversation

@bawolf
Copy link

@bawolf bawolf commented Feb 9, 2026

Summary

OTP 28's Dialyzer 5.4 reworked opaque type checking as part of EEP-69: Nominal Types, which renamed and replaced several warning atoms. Without handling them, dialyxir prints "Unknown warning" and falls through to legacy formatting, bypassing the ignore file.

This PR adds three new warning modules to match the OTP 28 changes:

  • exact_compare (replaces exact_eq) — comparison that can never evaluate to the expected value. Dynamically reports 'true' or 'false' based on the operator (==/=:= vs /=/=/=).
  • opaque_compare (replaces opaque_eq + absorbs opaque_neq) — equality/inequality test involving an opaque type.
  • opaque_union (new) — function body yields a type whose opacity is broken by other clauses. This is the only new warning explicitly documented in the release notes; it has a corresponding -Wno_opaque_union suppression flag in Dialyzer.

The existing OTP 26/27 modules (ExactEquality, OpaqueEquality, OpaqueNonequality) are preserved for backward compatibility.

Also adds OTP 28.0 to the CI matrix.

Fixes #562

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.

Unkown warning: :exact_compare

1 participant