Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/ApplicationExpr.cc

    r6c3a988f r2c57025  
    2424
    2525ParamEntry::ParamEntry( const ParamEntry &other ) :
    26                 decl( other.decl ), actualType( maybeClone( other.actualType ) ), formalType( maybeClone( other.formalType ) ), expr( maybeClone( other.expr ) ), inferParams( new InferredParams( *other.inferParams ) ) {
     26                decl( other.decl ), actualType( maybeClone( other.actualType ) ), formalType( maybeClone( other.formalType ) ), expr( maybeClone( other.expr ) ) {
    2727}
    2828
     
    3434        formalType = maybeClone( other.formalType );
    3535        expr = maybeClone( other.expr );
    36         *inferParams = *other.inferParams;
    3736        return *this;
    3837}
     
    6362}
    6463
    65 void printInferParams( const InferredParams & inferParams, std::ostream &os, int indent, int level ) {
    66         if ( ! inferParams.empty() ) {
    67                 os << std::string(indent, ' ') << "with inferred parameters " << level << ":" << std::endl;
    68                 for ( InferredParams::const_iterator i = inferParams.begin(); i != inferParams.end(); ++i ) {
    69                         os << std::string(indent+2, ' ');
    70                         Declaration::declFromId( i->second.decl )->printShort( os, indent+2 );
    71                         os << std::endl;
    72                         printInferParams( *i->second.inferParams, os, indent+2, level+1 );
    73                 } // for
    74         } // if
    75 }
    76 
    7764void ApplicationExpr::print( std::ostream &os, int indent ) const {
    7865        os << "Application of" << std::endl << std::string(indent+2, ' ');
     
    8269                printAll( args, os, indent+2 );
    8370        } // if
    84         printInferParams( inferParams, os, indent+2, 0 );
     71        if ( ! inferParams.empty() ) {
     72                os << std::string(indent, ' ') << "with inferred parameters:" << std::endl;
     73                for ( InferredParams::const_iterator i = inferParams.begin(); i != inferParams.end(); ++i ) {
     74                        os << std::string(indent+2, ' ');
     75                        Declaration::declFromId( i->second.decl )->printShort( os, indent+2 );
     76                        os << std::endl;
     77                } // for
     78        } // if
    8579        Expression::print( os, indent );
    8680}
Note: See TracChangeset for help on using the changeset viewer.