zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

opaque_type_test.ex (709B)


      1 defmodule Dialyxir.Warnings.OpaqueTypeTest do
      2   @behaviour Dialyxir.Warning
      3 
      4   @impl Dialyxir.Warning
      5   @spec warning() :: :opaque_type_test
      6   def warning(), do: :opaque_type_test
      7 
      8   @impl Dialyxir.Warning
      9   @spec format_short([String.t()]) :: String.t()
     10   def format_short([function, _opaque]) do
     11     "The type test in #{function} breaks the opaqueness of the term."
     12   end
     13 
     14   @impl Dialyxir.Warning
     15   @spec format_long([String.t()]) :: String.t()
     16   def format_long([function, opaque]) do
     17     "The type test #{function}(#{opaque}) breaks the opaqueness of the term #{opaque}."
     18   end
     19 
     20   @impl Dialyxir.Warning
     21   @spec explain() :: String.t()
     22   def explain() do
     23     Dialyxir.Warning.default_explain()
     24   end
     25 end