-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
You can't specify a contract for a private function.
For example:
defmodule Test do
use Norm
@contract public() :: :ok
def public(), do: :ok
@contract private() :: :ok
defp private(), do: ok
endGives the error:
** (ArgumentError) contract for undefined function private/0There's a strong argument that only contracts at a module's boundaries should have contracts (or tests). But the author has stated: "My goal is to build a system that allows you to validate any elixir data at any point in your stack."
My workaround for now is to make all my functions public.
PS: Take my flood of issues as evidence that I'm loving the library.
keathley
Metadata
Metadata
Assignees
Labels
No labels