Date: 2016-02-01 06:58 pm (UTC)
develop7: (dero)
From: [personal profile] develop7
в общем, поигрался я немного. на
handle_cast(Request, State) ->
	_ = Request,
	{dafuq, State};
handle_cast(_Msg, State) ->
	{noreply, State}.
dialyzer ругается
teest.erl:34: The inferred return type of handle_cast/2 ({'dafuq',_}) has nothing in common with {'noreply',_} | {'noreply',_,'hibernate' | 'infinity' | non_neg_integer()} | {'stop',_,_}, which is the expected return type for the callback of gen_server behaviour
, как и требовалось. А вот на такое
handle_cast({dafuq, _Ugh}, State) ->
	{dafuq, State};
handle_cast(_Msg, State) ->
	{noreply, State}.
не ругается.
Т.е. клозы с паттернматчингом почему-то успешно пропускаются.

Вопрос — кто здесь неправ?
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting