On Wednesday, April 4, 2018 at 1:39:35 PM UTC-4, Onorio Catenacci wrote:
>
> Hi all,
>
> I've been working through Lance Halvorson's book and I got to a point 
> where I was trying to test the ability to join a phoenix channel via JS 
> code.  I kept getting back an error to the effect that it couldn't find the 
> join/3 function in the channel. The code he had was something like this:
>
> def join("game:" <> game, _payload, socket) do
>    {:ok, socket}
> end
>
> When I checked the Channel.join docs, I spotted that that second parameter 
> is typespec'd as a map. I modified the parameter to %{} = _payload and sure 
> enough everything worked as expected.
>
> I then noticed that I was getting a compiler warning about join/3 not 
> properly implementing the protocol.  
>
> I'm sorry--I realize I'm being kind of vague. I just wanted to see if 
> maybe that should be an _error_ not a warning.  Just wondering about 
> opinions on this.
>
> If my vagueness is too hard to follow for this conversation, I can dig up 
> exact code and messages. :)
>
>
>
It occurs to me that probably my question wasn't as clear as I hoped.

Right now when a function is not properly implementing the associated 
protocol I get a compiler _warning_.  Does anyone else feel (as I do) that 
it should actually be a compiler _error_? 

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/e259d60f-7909-4198-96e6-ab56550797d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to