Closed dmaze closed 1 year ago
Given this module:
defmodule Test do @options_schema NimbleOptions.new!( map: [type: :map] ) @type option() :: unquote(NimbleOptions.option_typespec(@options_schema)) end
Loading this up in Visual Studio Code with ElixirLS produces a Dialyzer error
(CaseClauseError) no case clause matching: :map Stacktrace: │ (nimble_options 0.5.0) lib/nimble_options/docs.ex:163: NimbleOptions.Docs.type_to_spec/1 │ (nimble_options 0.5.0) lib/nimble_options/docs.ex:156: anonymous fn/1 in NimbleOptions.Docs.schema_to_spec/1 │ (elixir 1.14.1) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2 │ (nimble_options 0.5.0) lib/nimble_options/docs.ex:155: NimbleOptions.Docs.schema_to_spec/1 │ test.ex:5: (module)
It looks like NimbleOptions.Docs.type_to_spec/1 doesn't support :map or {:map, key_type, value_type}.
NimbleOptions.Docs.type_to_spec/1
:map
{:map, key_type, value_type}
Ah, can you please send a PR?
Given this module:
Loading this up in Visual Studio Code with ElixirLS produces a Dialyzer error
It looks like
NimbleOptions.Docs.type_to_spec/1
doesn't support:map
or{:map, key_type, value_type}
.