Skip to content

Commit

Permalink
Properly ignore alias references
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa1977 committed Apr 12, 2024
1 parent 33d2e58 commit a706fda
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/boundary/checker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ defmodule Boundary.Checker do
# of the impl, they may belong to different boundaries
not reference_to_implemented_protocol?(view, reference),
from_boundary = Boundary.for_module(view, reference.from),
from_boundary != nil,
from_boundary.check.aliases or reference.type != :alias_reference,
to_boundaries = to_boundaries(view, from_boundary, reference),
{type, to_boundary_name} <- [reference_error(view, reference, from_boundary, to_boundaries)] do
{:invalid_reference,
Expand Down Expand Up @@ -222,9 +224,6 @@ defmodule Boundary.Checker do
not to_boundary.check.in ->
nil

reference.type == :alias_reference and not from_boundary.check.aliases ->
nil

to_boundary == from_boundary ->
nil

Expand Down

0 comments on commit a706fda

Please sign in to comment.