Changeset 6b95feb


Ignore:
Timestamp:
Jan 4, 2025, 12:22:39 AM (2 weeks ago)
Author:
Fangren Yu <f37yu@…>
Branches:
master
Children:
8893ad4
Parents:
2a32118
Message:

implement return cast for other types of expressions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    r2a32118 r6b95feb  
    12251225
    12261226                        // return casts are eliminated (merely selecting an overload, no actual operation)
    1227                         candidates = std::move(finder.candidates);
     1227                        for (auto & cand : finder.candidates) {
     1228                                if (typesCompatibleIgnoreQualifiers(toType, cand->expr->result, cand->env)) {
     1229                                        candidates.push_back (cand);
     1230                                }
     1231                        }
     1232                        // candidates = std::move(finder.candidates);
    12281233                        return;
    12291234                }
Note: See TracChangeset for help on using the changeset viewer.