Skip to content

t() issues with struct!/2 #177

@alanvardy

Description

@alanvardy

Code:

  @type t :: %__MODULE__{
          ..fields here
        }


  @doc false
  @spec new(map) :: t()
  def new(params) do
    struct!(__MODULE__, params)
  end

Error

The function call on line 44 is expected to have type t() but it has type struct()
42   @spec new(map) :: t()
43   def new(params) do
44     struct!(__MODULE__, params)
45   end
46 end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions