Goose  Diff

Differences From Artifact [240673d8fa]:

  • File bs/builtins/types/overloadset/invoke.cpp — part of check-in [26ee86b2dd] at 2019-04-14 20:10:48 on branch trunk — Small cleanup. (user: achavasse size: 2506)

To Artifact [94c4114ecc]:

  • File bs/builtins/types/overloadset/invoke.cpp — part of check-in [2acce94d2d] at 2019-06-29 14:36:18 on branch trunk — Handle execution domains when invoking/unifying functions, template functions, overload sets and constrained funcs. (user: achavasse size: 2518)

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
                optional< UnificationContext > bestUC;
                optional< Term > bestSol;
                const OverloadSet::Overload* bestOvl = nullptr;
                bool ambiguous = false;

                auto rtPat = MkHole( "_"_sid );

                for( auto&& [s,ovl,uc] : pOvlSet->unify( args.val(), rtPat, uc ) )
                {
                    if( uc.numUnknownValues() )
                        continue;

                    if( !bestSol || uc.score() > bestUC->score() )
                    {
                        auto ssol = Substitute( s, uc );







|







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
                optional< UnificationContext > bestUC;
                optional< Term > bestSol;
                const OverloadSet::Overload* bestOvl = nullptr;
                bool ambiguous = false;

                auto rtPat = MkHole( "_"_sid );

                for( auto&& [s,ovl,uc] : pOvlSet->unify( c.domain(), args.val(), rtPat, uc ) )
                {
                    if( uc.numUnknownValues() )
                        continue;

                    if( !bestSol || uc.score() > bestUC->score() )
                    {
                        auto ssol = Substitute( s, uc );