Manuel Bärenz

Results 466 comments of Manuel Bärenz

It is _not_ caused by: ```elixir defmodule Foo do defstruct [] @spec foo(t, %{}) :: %{ :foo => t } when t: any() def foo(t, empty_map = %{}) do %{empty_map...

Related error, even simpler: ```elixir defmodule Foo do @spec foo(t) :: %{ :foo => t, :bar => t } when t: any() def foo(t) do %{foo: t, bar: t} end...

So currently, type inference is only done for `%{}` and `%{foo => bar}`. The missing cases are `%{some_map | foo => bar}` and `%{foo1 => bar1, foo2 => bar2,...}`.

In fact, this issue needs to be solved before `ex_type` can check itself, since `ExType.Type` contains mutual recursion.

> Maybe it's possible to stop this by making references to local types lazy. Instead of evaluating them, insert a closure, and only compute it when you need to compare...

Glad to hear from you :) I'm trying to solve this issue here, but I'm not so sure yet whether I can.

An acceptable workaround might be manually expanding `__MODULE__`.

I need to solve https://github.com/gyson/ex_type/issues/35 first.

It turned out I could solve it without solving #35

I wonder why the "`raw`" case was there at all. When is it needed?