Open arcusfelis opened 11 months ago
Hi,
Code:
-spec wait_response(non_neg_integer() | infinity) -> _. wait_response(Timeout) -> receive some_message -> ok after Timeout -> % Line 80 erlang:demonitor(Mon, [flush]), error(timeout) end.
Fails with:
The variable on line 80 at column 11 is expected to have type integer() but it has type non_neg_integer() | infinity
But Timeout = infinity is a pretty common way to disable timeouts (or allow the caller to wait forever).
Timeout = infinity
Also the same issue if I use a built-in type timeout() in the spec.
timeout()
Hi,
Code:
Fails with:
But
Timeout = infinity
is a pretty common way to disable timeouts (or allow the caller to wait forever).Also the same issue if I use a built-in type
timeout()
in the spec.