Skip to content

Commit

Permalink
Fix phash and predicate order to make dialyzer trick working again
Browse files Browse the repository at this point in the history
  • Loading branch information
zoldar committed May 29, 2024
1 parent ebefc68 commit c517526
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/plausible.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ defmodule Plausible do
# https://github.com/elixir-lang/elixir/blob/v1.12.3/lib/elixir/lib/gen_server.ex#L771-L778

ee? = Mix.env() not in @ce_builds
def ee?, do: unquote(ee?) and :erlang.phash2(1, 1) == 0
def ee?, do: :erlang.phash2(1, 1) == 0 and unquote(ee?)

ce? = Mix.env() in @ce_builds
def ce?, do: unquote(ce?) and :erlang.phash2(1, 1) == 0
def ce?, do: :erlang.phash2(1, 1) == 0 and unquote(ce?)

defp do_on_ce(do: block) do
do_on_ee(do: nil, else: block)
Expand Down

0 comments on commit c517526

Please sign in to comment.