Ignore:
Timestamp:
Nov 16, 2016, 4:37:50 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
186fd86
Parents:
33a7b6d
Message:

moved substituion into MemberExpr? constructor, change generated tuple structs to generic structs, tuples containing type variables almost works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.cc

    r33a7b6d rd9fa60a  
    218218                std::list< Declaration* > members;
    219219                aggInst->lookup( name, members );
    220                 TypeSubstitution sub = TypeSubstitution( aggInst->get_baseParameters()->begin(), aggInst->get_baseParameters()->end(), aggInst->get_parameters().begin() );
    221220                for ( std::list< Declaration* >::const_iterator i = members.begin(); i != members.end(); ++i ) {
    222221                        if ( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType* >( *i ) ) {
    223                                 MemberExpr * memExpr = new MemberExpr( dwt, expr->clone() );
    224                                 sub.apply( memExpr );
    225                                 alternatives.push_back( Alternative( memExpr, env, newCost ) );
     222                                alternatives.push_back( Alternative( new MemberExpr( dwt, expr->clone() ), env, newCost ) );
    226223                                renameTypes( alternatives.back().expr );
    227224                        } else {
Note: See TracChangeset for help on using the changeset viewer.