Total errors: 1, Skipped: 0, Unnecessary Skips: 0
done in 0m1.18s
lib/growth_book.ex:86:invalid_contract
The @spec for the function does not match the success typing of the function.
Function:
GrowthBook.get_experiment_result/6
Success typing:
@spec get_experiment_result(
%GrowthBook.Context{:attributes => nil | maybe_improper_list() | map(), _ => _},
%GrowthBook.Experiment{:hash_attribute => _, :meta => _, :variations => _, _ => _},
_,
_,
_,
_
) :: %GrowthBook.ExperimentResult{
:bucket => _,
:feature_id => _,
:hash_attribute => _,
:hash_used? => _,
:hash_value => _,
:in_experiment? => boolean(),
:key => _,
:name => _,
:passthrough? => _,
:sticky_bucket_used? => nil,
:value => _,
:variation_id => integer()
}
________________________________________________________________________________
done (warnings were emitted)
Halting VM with exit status 2
Overview
Dialyzer returns error about get_experiment_result function type: