Changeset 5a824c2


Ignore:
Timestamp:
Aug 14, 2017, 5:23:31 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
b37dba0
Parents:
6cfe8bb
Message:

Fix count in resolver error message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.cc

    r6cfe8bb r5a824c2  
    193193                        if ( alternatives.begin() == oldBegin ) {
    194194                                std::ostringstream stream;
    195                                 stream << "Can't choose between " << alternatives.size() << " alternatives for expression ";
     195                                AltList winners;
     196                                findMinCost( alternatives.begin(), alternatives.end(), back_inserter( winners ) );
     197                                stream << "Can't choose between " << winners.size() << " alternatives for expression ";
    196198                                expr->print( stream );
    197199                                stream << "Alternatives are:";
    198                                 AltList winners;
    199                                 findMinCost( alternatives.begin(), alternatives.end(), back_inserter( winners ) );
    200200                                printAlts( winners, stream, 8 );
    201201                                throw SemanticError( stream.str() );
Note: See TracChangeset for help on using the changeset viewer.