Solve constraints together and in the order they are added #851

Merged
ghallak merged 6 commits from ghallak/358 into master 2021-12-16 20:54:07 +09:00
Showing only changes of commit 5d0a0eea85 - Show all commits

View File

@ -2362,6 +2362,8 @@ solve_unknown_record_types(Env, Unknown) ->
false -> Solutions false -> Solutions
end. end.
%% This will solve all kinds of constraints but will only return the
%% unsolved field constraints
-spec solve_known_record_types(env(), [constraint()]) -> [field_constraint()]. -spec solve_known_record_types(env(), [constraint()]) -> [field_constraint()].
solve_known_record_types(Env, Constraints) -> solve_known_record_types(Env, Constraints) ->
DerefConstraints = lists:map(fun(C = #field_constraint{record_t = RecordType}) -> DerefConstraints = lists:map(fun(C = #field_constraint{record_t = RecordType}) ->