Changes in src/GenPoly/GenPoly.cc [08fc48f:9b18044]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/GenPoly.cc
r08fc48f r9b18044 336 336 assertf(bparam, "Aggregate parameters should be type expressions"); 337 337 338 // xxx - might need to let VoidType be a wildcard here too; could have some voids 338 // xxx - might need to let VoidType be a wildcard here too; could have some voids 339 339 // stuffed in for dtype-statics. 340 340 // if ( is<VoidType>( aparam->get_type() ) || is<VoidType>( bparam->get_type() ) ) continue; 341 341 if ( ! typesPolyCompatible( aparam->get_type(), bparam->get_type() ) ) return false; 342 342 } 343 343 344 344 return true; 345 345 } … … 350 350 // polymorphic types always match 351 351 if ( aid == type_index{typeid(TypeInstType)} ) return true; 352 352 353 353 type_index bid{ typeid(*b) }; 354 354 // polymorphic types always match 355 355 if ( bid == type_index{typeid(TypeInstType)} ) return true; 356 356 357 357 // can't match otherwise if different types 358 358 if ( aid != bid ) return false; … … 377 377 ConstantExpr *ad = dynamic_cast<ConstantExpr*>( aa->get_dimension() ); 378 378 ConstantExpr *bd = dynamic_cast<ConstantExpr*>( ba->get_dimension() ); 379 if ( ad && bd 379 if ( ad && bd 380 380 && ad->get_constant()->get_value() != bd->get_constant()->get_value() ) 381 381 return false; … … 433 433 434 434 void addToTyVarMap( TypeDecl * tyVar, TyVarMap &tyVarMap ) { 435 // xxx - should this actually be insert? 435 436 tyVarMap[ tyVar->get_name() ] = TypeDecl::Data{ tyVar }; 436 437 }
Note: See TracChangeset
for help on using the changeset viewer.