Qqwy / elixir-type_check

TypeCheck: Fast and flexible runtime type-checking for your Elixir projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix `maybe_improper_list` to _not_ allow proper lists

Qqwy opened this issue · comments

maybe_improper_list(element_type(), terminator_type()) does not in actuality mean 'an improper or proper list' but instead means: a 'list' with elements element_type() and terminator terminator_type().
This list will thus not maybe be improper, but always be improper.
Only when [] is passed explicitly as (one of the possible) terminator_type() (s), will the result 'by accident' be a 'proper' list.

c.f. erlang/otp#6038 and elixir-lang/elixir#11886