[erlang-questions] dialyzer is driving me nuts

Joel Reymont joelr1@REDACTED
Tue Oct 18 19:57:00 CEST 2011

Let's just say I've been going batshit crazy since last week, managing to fix a single file to Dialyzer's liking.

Consider the following https://gist.github.com/5744c70b2a6f918ddb56

The first message can be summarized as

barrier_start.erl:50: The specification for barrier_start:barrier_start/3 states that the function might also return {'stop',#game{},tuple()} but the inferred return is {'continue',#game{{},_} | {'skip',#game{},_}

but what about this clause in my code? Does Dialyzer think it will never be triggered? Why?

barrier_start(Game = #game{}, Ctx, {'EXIT', Barrier, _})
  when is_pid(Barrier), 
       Barrier =:= Game#game.barrier ->
    {stop, Game, Ctx};

The second message is a beauty!

barrier_start.erl:74: The call gamelib:join(Game::#game{},Event::#pm_event{pm_message::#pm_join{}},1) does not have a term of type #game{} (with opaque subterms) as 1st argument

What in the world does it mean? 


- for hire: mac osx device driver ninja, kernel extensions and usb drivers
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont

More information about the erlang-questions mailing list