Changeset ef9988b for src/AST


Ignore:
Timestamp:
Aug 18, 2020, 4:26:19 PM (4 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
13d33a75
Parents:
4fe6224
Message:

fix lost typeinst in resolved assertions

Location:
src/AST
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r4fe6224 ref9988b  
    167167                        LinkageSpec::Spec( node->linkage.val ),
    168168                        bfwd,
    169                         type,
     169                        type->clone(),
    170170                        init,
    171171                        attr,
  • src/AST/Print.cpp

    r4fe6224 ref9988b  
    237237        void postprint( const ast::Expr * node ) {
    238238                print( node->inferred );
     239
     240                if ( node->result ) {
     241                        os << endl << indent << "... with resolved type:" << endl;
     242                        ++indent;
     243                        os << indent;
     244                        node->result->accept( *this );
     245                        --indent;
     246                }
    239247
    240248                if ( node->env ) {
  • src/AST/TypeSubstitution.hpp

    r4fe6224 ref9988b  
    195195        assert( input );
    196196        Pass<Substituter> sub( *this, true );
    197         input = strict_dynamic_cast< const SynTreeClass * >( input->accept( sub ) );
     197        input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );
    198198        return { input, sub.core.subCount };
    199199}
Note: See TracChangeset for help on using the changeset viewer.