[erlang-questions] 12B4 dialyzer problem 5
Anthony Shipman
als@REDACTED
Wed Sep 17 18:29:56 CEST 2008
On Thu, 18 Sep 2008 12:56:54 am Kostis Sagonas wrote:
> Thu Sep 18 00:56:54 2008
>
>
> Anthony Shipman wrote:
> > I had a -spec that read
> >
> > -spec getHandlerModule(string()) -> {ok, Module::atom(), StrmID::integer}
> > | error.
>
> You shouldn't have had ;-)
>
> To avoid typos like that, which sadly are very common, we _strongly_
> recommend that you follow the convention of writing atoms quoted in spec
> declarations. I.e. that you write:
>
> -spec getHandlerModule(string()) ->
> {'ok', Module::atom(), StrmID::integer()} | 'error'.
I think that that would only work well if dialyzer required it or warned when
it found an unquoted atom.
--
Anthony Shipman Mamas don't let your babies
als@REDACTED grow up to be outsourced.
More information about the erlang-questions
mailing list