Changes in src/GenPoly/GenPoly.cc [93c10de:e9b5043]
- File:
-
- 1 edited
-
src/GenPoly/GenPoly.cc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/GenPoly.cc
r93c10de re9b5043 24 24 #include <vector> // for vector 25 25 26 #include "AST/Expr.hpp" 26 27 #include "AST/Type.hpp" 28 #include "AST/TypeSubstitution.hpp" 27 29 #include "GenPoly/ErasableScopedMap.h" // for ErasableScopedMap<>::const_it... 28 30 #include "ResolvExpr/typeops.h" // for flatten … … 170 172 171 173 if ( TypeInstType *typeInst = dynamic_cast< TypeInstType * >( type ) ) { 172 if ( tyVars. find( typeInst->get_name() ) != tyVars.end() ) {174 if ( tyVars.contains( typeInst->get_name() ) ) { 173 175 return type; 174 176 } … … 187 189 188 190 if ( auto typeInst = dynamic_cast< const ast::TypeInstType * >( type ) ) { 189 return tyVars.find(typeInst->typeString()) != tyVars.end() ? type : nullptr;191 if ( tyVars.contains( typeInst->typeString() ) ) return type; 190 192 } else if ( auto arrayType = dynamic_cast< const ast::ArrayType * >( type ) ) { 191 193 return isPolyType( arrayType->base, env ); … … 203 205 204 206 if ( auto inst = dynamic_cast< const ast::TypeInstType * >( type ) ) { 205 if ( typeVars. find( *inst ) != typeVars.end() ) return type;207 if ( typeVars.contains( *inst ) ) return type; 206 208 } else if ( auto array = dynamic_cast< const ast::ArrayType * >( type ) ) { 207 209 return isPolyType( array->base, subst ); … … 391 393 392 394 if ( TypeInstType *typeInstType = dynamic_cast< TypeInstType * >( type ) ) { 393 if ( tyVars. find( typeInstType->get_name() ) != tyVars.end() ) {395 if ( tyVars.contains( typeInstType->get_name() ) ) { 394 396 return true; 395 397 } … … 490 492 } 491 493 494 /// Flattens a list of types. 495 // There is another flattenList in Unify. 492 496 void flattenList( vector<ast::ptr<ast::Type>> const & src, 493 497 vector<ast::ptr<ast::Type>> & out ) {
Note:
See TracChangeset
for help on using the changeset viewer.