Goose  Diff

Differences From Artifact [7b6f85eeeb]:

  • File bs/builtins/types/overloadset/invoke.cpp — part of check-in [224370818a] at 2019-03-16 21:27:19 on branch trunk — Overloading: the first time a function or function template declaration is encountered, it is stored in a new overloadset. (user: achavasse size: 2125)

To Artifact [e5c0df3529]:

  • File bs/builtins/types/overloadset/invoke.cpp — part of check-in [dd70f4c696] at 2019-03-17 15:54:13 on branch trunk — Sema: terms can now be wrapped along with a callback to be invoked by Substitute(). (user: achavasse size: 2248)

23
24
25
26
27
28
29




30
31
32
33
34

35
36
37
38
39
40
41
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

38
39
40
41
42
43
44
45







+
+
+
+




-
+








                auto rtPat = sema::MkHole( "_"_sid );

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

                    auto ssol = Substitute( s, uc );
                    if( !ssol )
                        continue;

                    if( !bestSol || uc.score() > bestUC->score() )
                    {
                        bestUC = uc;
                        bestSol = s;
                        bestSol = ssol;
                        bestOvl = ovl;
                        ambiguous = false;
                        continue;
                    }

                    if( uc.score() < bestUC->score() )
                        continue;