Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    rfc1a3e2 reb7586e  
    906906                                }
    907907                                CandidateRef & choice = winners.front();
    908                                 choice->cost.incVar();
     908                                choice->cost.incSafe();
    909909                                candidates.emplace_back( std::move(choice) );
    910910                        }
     
    13761376                        ast::Expr * newExpr = data.combine( nameExpr->location, cost );
    13771377
    1378                         bool bentConversion = false;
    1379                         if ( auto inst = newExpr->result.as<ast::EnumInstType>() ) {
    1380                                 if ( inst->base && inst->base->base ) {
    1381                                         bentConversion = true;
    1382                                 }
    1383                         }
    1384 
     1378                        // bool bentConversion = false;
     1379                        // if ( auto inst = newExpr->result.as<ast::EnumInstType>() ) {
     1380                        //      if ( inst->base && inst->base->base ) {
     1381                        //              bentConversion = true;
     1382                        //      }
     1383                        // }
     1384
     1385                        // CandidateRef newCand = std::make_shared<Candidate>(
     1386                        //      newExpr, copy( tenv ), ast::OpenVarSet{}, ast::AssertionSet{}, bentConversion? Cost::safe: Cost::zero,
     1387                        //      cost );
    13851388                        CandidateRef newCand = std::make_shared<Candidate>(
    1386                                 newExpr, copy( tenv ), ast::OpenVarSet{}, ast::AssertionSet{}, bentConversion? Cost::safe: Cost::zero,
     1389                                newExpr, copy( tenv ), ast::OpenVarSet{}, ast::AssertionSet{}, Cost::zero,
    13871390                                cost );
    1388 
    13891391                        if (newCand->expr->env) {
    13901392                                newCand->env.add(*newCand->expr->env);
     
    18291831                                        Cost cost = Cost::zero;
    18301832                                        ast::Expr * newExpr = data.combine( expr->location, cost );
     1833                                        // CandidateRef newCand =
     1834                                        //      std::make_shared<Candidate>(
     1835                                        //              newExpr, copy( tenv ), ast::OpenVarSet{},
     1836                                        //              ast::AssertionSet{}, Cost::safe, cost
     1837                                        //      );
    18311838                                        CandidateRef newCand =
    18321839                                                std::make_shared<Candidate>(
    18331840                                                        newExpr, copy( tenv ), ast::OpenVarSet{},
    1834                                                         ast::AssertionSet{}, Cost::safe, cost
     1841                                                        ast::AssertionSet{}, Cost::zero, cost
    18351842                                                );
    1836 
    18371843                                        if (newCand->expr->env) {
    18381844                                                newCand->env.add(*newCand->expr->env);
Note: See TracChangeset for help on using the changeset viewer.