Changeset 98a249f


Ignore:
Timestamp:
Nov 22, 2017, 3:35:22 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:
b95fe40
Parents:
5c4d27f
Message:

Add operator<< for TypeEnvironment?

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/TypeEnvironment.cc

    r5c4d27f r98a249f  
    212212        }
    213213
     214        std::ostream & operator<<( std::ostream & out, const TypeEnvironment & env ) {
     215                env.print( out );
     216                return out;
     217        }
    214218} // namespace ResolvExpr
    215219
  • src/ResolvExpr/TypeEnvironment.h

    r5c4d27f r98a249f  
    8686                TypeEnvironment *clone() const { return new TypeEnvironment( *this ); }
    8787
    88                 /// Iteratively adds the environment of a new actual (with allowWidening = false), 
     88                /// Iteratively adds the environment of a new actual (with allowWidening = false),
    8989                /// and extracts open variables.
    9090                void addActual( const TypeEnvironment& actualEnv, OpenVarSet& openVars );
     
    114114                return sub.applyFree( type );
    115115        }
     116
     117        std::ostream & operator<<( std::ostream & out, const TypeEnvironment & env );
    116118} // namespace ResolvExpr
    117119
  • src/SynTree/Expression.cc

    r5c4d27f r98a249f  
    324324                        return makeSub( refType->get_base() );
    325325                } else if ( StructInstType * aggInst = dynamic_cast< StructInstType * >( t ) ) {
    326                         return TypeSubstitution( aggInst->get_baseParameters()->begin(), aggInst->get_baseParameters()->end(), aggInst->get_parameters().begin() );
     326                        return TypeSubstitution( aggInst->get_baseParameters()->begin(), aggInst->get_baseParameters()->end(), aggInst->parameters.begin() );
    327327                } else if ( UnionInstType * aggInst = dynamic_cast< UnionInstType * >( t ) ) {
    328                         return TypeSubstitution( aggInst->get_baseParameters()->begin(), aggInst->get_baseParameters()->end(), aggInst->get_parameters().begin() );
     328                        return TypeSubstitution( aggInst->get_baseParameters()->begin(), aggInst->get_baseParameters()->end(), aggInst->parameters.begin() );
    329329                } else {
    330330                        assertf( false, "makeSub expects struct or union type for aggregate, but got: %s", toString( t ).c_str() );
Note: See TracChangeset for help on using the changeset viewer.