typed_ecto_schema v0.4.3
Example of field that causes the error:
field(:foo, {:array, Ecto.Enum}, values: [], default: []) :: list(String.t())
== Compilation error
** (FunctionClauseError) no function clause matching in TypedEctoSchema.EctoTypeMapper.disjunction_typespec/1
The following arguments were given to TypedEctoSchema.EctoTypeMapper.disjunction_typespec/1:
# 1
[]
Attempted function clauses (showing 1 out of 1):
defp disjunction_typespec([entry | _rest] = all)
(typed_ecto_schema 0.4.3) lib/typed_ecto_schema/ecto_type_mapper.ex:136: TypedEctoSchema.EctoTypeMapper.disjunction_typespec/1
(typed_ecto_schema 0.4.3) lib/typed_ecto_schema/ecto_type_mapper.ex:84: TypedEctoSchema.EctoTypeMapper.base_type_for/2
(typed_ecto_schema 0.4.3) lib/typed_ecto_schema/ecto_type_mapper.ex:45: TypedEctoSchema.EctoTypeMapper.type_for/4
(typed_ecto_schema 0.4.3) lib/typed_ecto_schema/type_builder.ex:128: TypedEctoSchema.TypeBuilder.add_field/5
Perhaps it would be better to issue an error message?