Skip to content

Commit

Permalink
incorporate disambiguation fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmad Rezaii <[email protected]>
  • Loading branch information
arezaii committed Sep 20, 2024
1 parent dc6b9aa commit ef3fc7f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frontend/lib/resolution/disambiguation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,17 @@ static int testArgMapping(const DisambiguationContext& dctx,
// class GenericChild : Parent { type t; }
// Here a GenericChild argument should be preferred to a Parent one
if (f1Type == f2Type) {

if (f1Param && !f2Param) {
reason = "param vs not";
return 1;
}

if (!f1Param && f2Param) {
reason = "param vs not";
return 2;
}

if (!f1Instantiated && f2Instantiated) {
reason = "concrete vs generic";
return 1;
Expand Down

0 comments on commit ef3fc7f

Please sign in to comment.