Changes in src/ResolvExpr/Unify.cc [62423350:36a5a77]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Unify.cc
r62423350 r36a5a77 42 42 virtual void visit(PointerType *pointerType); 43 43 virtual void visit(ArrayType *arrayType); 44 virtual void visit(ReferenceType *refType); 44 45 virtual void visit(FunctionType *functionType); 45 46 virtual void visit(StructInstType *aggregateUseType); … … 142 143 143 144 bool bindVar( TypeInstType *typeInst, Type *other, const TypeDecl::Data & data, TypeEnvironment &env, AssertionSet &needAssertions, AssertionSet &haveAssertions, const OpenVarSet &openVars, WidenMode widenMode, const SymTab::Indexer &indexer ) { 145 // remove references from other, so that type variables can only bind to value types 146 other = other->stripReferences(); 144 147 OpenVarSet::const_iterator tyvar = openVars.find( typeInst->get_name() ); 145 148 assert( tyvar != openVars.end() ); … … 376 379 } // if 377 380 } else { 381 common = type1->clone(); 382 common->get_qualifiers() = tq1 | tq2; 378 383 result = true; 379 384 } // if … … 425 430 markAssertions( haveAssertions, needAssertions, pointerType ); 426 431 markAssertions( haveAssertions, needAssertions, otherPointer ); 432 } // if 433 } 434 435 void Unify::visit(ReferenceType *refType) { 436 if ( ReferenceType *otherRef = dynamic_cast< ReferenceType* >( type2 ) ) { 437 result = unifyExact( refType->get_base(), otherRef->get_base(), env, needAssertions, haveAssertions, openVars, WidenMode( false, false ), indexer ); 438 markAssertions( haveAssertions, needAssertions, refType ); 439 markAssertions( haveAssertions, needAssertions, otherRef ); 427 440 } // if 428 441 }
Note: See TracChangeset
for help on using the changeset viewer.