Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.cc

    r89e6ffc r0b150ec  
    3030///     std::cout << "type inst " << destAsTypeInst->get_name();
    3131                        if ( env.lookup( destAsTypeInst->get_name(), eqvClass ) ) {
    32                                 return conversionCost( src, eqvClass.type, indexer, env );
     32                                if ( eqvClass.type ) {
     33                                        return conversionCost( src, eqvClass.type, indexer, env );
     34                                } else {
     35                                        return Cost::infinity;
     36                                }
    3337                        } else if ( ( namedType = indexer.lookupType( destAsTypeInst->get_name() ) ) ) {
    3438///       std::cout << " found" << std::endl;
     
    240244                        std::list< Type* >::const_iterator srcIt = tupleType->get_types().begin();
    241245                        std::list< Type* >::const_iterator destIt = destAsTuple->get_types().begin();
    242                         while ( srcIt != tupleType->get_types().end() ) {
     246                        while ( srcIt != tupleType->get_types().end() && destIt != destAsTuple->get_types().end() ) {
    243247                                Cost newCost = conversionCost( *srcIt++, *destIt++, indexer, env );
    244248                                if ( newCost == Cost::infinity ) {
Note: See TracChangeset for help on using the changeset viewer.