Ignore:
Timestamp:
Nov 20, 2015, 12:27:01 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, ctor, deferred_resn, demangler, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, string, with_gc
Children:
66a2a61, 70d4b4f, 839ccbb
Parents:
258eb5c9
Message:

Fixed bug with get_baseParameters()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/TypeSubstitution.cc

    r258eb5c9 red94eac  
    147147        } // if
    148148        // bind type variables from generic type instantiations
    149         for ( std::list< TypeDecl* >::const_iterator tyvar = type->get_baseParameters().begin(); tyvar != type->get_baseParameters().end(); ++tyvar ) {
    150                 boundVars.insert( (*tyvar)->get_name() );
    151         } // for
     149        std::list< TypeDecl* > *baseParameters = type->get_baseParameters();
     150        if ( baseParameters && ! type->get_parameters().empty() ) {
     151                for ( std::list< TypeDecl* >::const_iterator tyvar = baseParameters->begin(); tyvar != baseParameters->end(); ++tyvar ) {
     152                        boundVars.insert( (*tyvar)->get_name() );
     153                } // for
     154        } // if
    152155        Type *ret = Mutator::mutate( type );
    153156        boundVars = oldBoundVars;
Note: See TracChangeset for help on using the changeset viewer.