Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/InstantiateGeneric.cc

    r0bfaf80 re58dfb9  
    122122                /// Adds a value for a (key, typeList) pair to the current scope
    123123                void insert( Key *key, const std::list< TypeExpr* > &params, Value *value ) {
    124                         instantiations[ key ].push_back( Instantiation( TypeList( params ), value ) );
     124                        auto it = instantiations.findAt( instantiations.currentScope(), key );
     125                        if ( it == instantiations.end() ) {
     126                                instantiations.insert( key, ValueList{ Instantiation{ TypeList( params ), value } } );
     127                        } else {
     128                                it->second.push_back( Instantiation{ TypeList( params ), value } );
     129                        }
    125130                }
    126131        };
Note: See TracChangeset for help on using the changeset viewer.