[erlang-questions] Dialyzer question

Zabrane Mickael zabrane3@REDACTED
Fri Dec 23 07:30:51 CET 2011


Hi Kostis, hi guys,

I'd like to express the following intention in my specification:

-spec foo() -> [byte(), byte(), byte()]
foo() ->
        ...
        return [26, 55, 127].
	...
	return [0, 13, 255].

foo/0 must returns a list of exactly 3 bytes().

Dialyzer complains about that. My actual solution isn't accurate:
-spec foo() -> [byte()]
foo() ->
        ...
        return [26, 55, 127].
	...
	return [0, 13, 255].

Any hint please?

Regards,
Zabrane

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111223/eded87ab/attachment.htm>


More information about the erlang-questions mailing list