Changeset cccc534 for src/GenPoly/GenPoly.cc
- Timestamp:
- Sep 1, 2017, 10:27:39 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, 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:
- 7d9ad510
- Parents:
- 058f549
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/GenPoly.cc
r058f549 rcccc534 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;
Note: See TracChangeset
for help on using the changeset viewer.