Skip to content

Commit 83c68ce

Browse files
committed
Simplify computation of mismatched parts for error messages
Before we were doing: common = intersection(actual, expected) uncommon = difference(actual, common) But the second clause is: actual and not (actual and expected) Which is literally the same as: actual and not expected But much faster as it avoids the large nesting of BDDs. Closes #14836.
1 parent 184b724 commit 83c68ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/lib/module/types/apply.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ defmodule Module.Types.Apply do
12831283
common = intersection(actual, expected)
12841284

12851285
uncommon_doc =
1286-
difference(actual, common)
1286+
difference(actual, expected)
12871287
|> to_quoted()
12881288
|> Code.Formatter.to_algebra()
12891289
|> ansi_red()

0 commit comments

Comments
 (0)