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

`String.t()` is not properly picked up as typename inside map syntax

Qqwy opened this issue · comments

This plagues both PR #158 and #157. It seems like a different problem than those issues but obviously it needs to be resolved for things like %{String.t() => any()} or %{required(String.t()) => any()} to work correctly.

Turns out this only happens in modules that are part of the TypeCheck repo itself, as they would sometimes be compiled before TypeCheck's default override modules were compiled.

By using require TypeCheck.DefaultOverrides we make sure that such a module is still compiled only after TypeCheck itself is recompiled with its own checks.

This does not impact any user code using this library in any way.

The fix is part of the now-published release v0.12.4.