Skip to content

Commit

Permalink
Fix riak_kv_bucket dialyzer warnings
Browse files Browse the repository at this point in the history
Pair-programmed with @reiddraper

* Change the expected type of allow_mult
* Change the error reason type to allow strings
  • Loading branch information
Vagabond committed Apr 11, 2014
1 parent f82fbe6 commit 43bf0e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/riak_kv_bucket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
-endif.

-type prop() :: {PropName::atom(), PropValue::any()}.
-type error() :: {PropName::atom(), ErrorReason::atom()}.
-type error_reason() :: atom() | string().
-type error() :: {PropName::atom(), ErrorReason::error_reason()}.
-type props() :: [prop()].
-type errors() :: [error()].

Expand Down Expand Up @@ -384,7 +385,7 @@ validate_update_dt_props(New, Valid, Invalid) ->
end.

%% @private just grab the allow_mult value if it exists
-spec allow_mult(props()) -> boolean().
-spec allow_mult(props()) -> boolean() | 'undefined' | 'error'.
allow_mult(Props) ->
case proplists:get_value(allow_mult, Props) of
undefined ->
Expand Down

0 comments on commit 43bf0e7

Please sign in to comment.