[erlang-questions] the record volates the declared type when I analysis the code
Solomon
solomon.wzs@REDACTED
Fri Apr 18 11:40:20 CEST 2014
Hi.
I declared a record like this:
-record(kv, {key::string(), value::integer()}).
and I create a mnesia table to save the record 'kv'
I select the table like this:
mnesia:dirty_select(table, [{#kv{key='_', value='$1'}, [{'>', '$1',
10}], ['_']}]).
then I analysis the code:
dialyzer --plt ./.depsolver_plt ./ebin/my.beam
and I get the error:
Record construction #kv{key::'_', value::'$1'} violates the declared
type of field key::string() and value::integer()
How should I fix the error?
Thanks.
More information about the erlang-questions
mailing list