Changes in src/ResolvExpr/Unify.cc [302ef2a:361bf01]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Unify.cc
r302ef2a r361bf01 773 773 774 774 const ast::Type * postvisit( const ast::TypeInstType * typeInst ) { 775 if ( const ast::EqvClass * clz = tenv.lookup( *typeInst) ) {775 if ( const ast::EqvClass * clz = tenv.lookup( typeInst->name ) ) { 776 776 // expand ttype parameter into its actual type 777 777 if ( clz->data.kind == ast::TypeDecl::Ttype && clz->bound ) { … … 811 811 /// Creates a tuple type based on a list of DeclWithType 812 812 template< typename Iter > 813 static const ast::Type *tupleFromTypes( Iter crnt, Iter end ) {813 static ast::ptr< ast::Type > tupleFromTypes( Iter crnt, Iter end ) { 814 814 std::vector< ast::ptr< ast::Type > > types; 815 815 while ( crnt != end ) { … … 821 821 } 822 822 823 return new ast::TupleType{ std::move(types)};823 return { new ast::TupleType{ std::move(types) } }; 824 824 } 825 825 … … 888 888 } 889 889 890 static void markAssertionSet( ast::AssertionSet & assns, const ast:: VariableExpr* assn ) {890 static void markAssertionSet( ast::AssertionSet & assns, const ast::DeclWithType * assn ) { 891 891 auto i = assns.find( assn ); 892 892 if ( i != assns.end() ) { … … 900 900 const ast::FunctionType * type 901 901 ) { 902 for ( auto & assert : type->assertions ) { 903 markAssertionSet( assn1, assert ); 904 markAssertionSet( assn2, assert ); 902 for ( const auto & tyvar : type->forall ) { 903 for ( const ast::DeclWithType * assert : tyvar->assertions ) { 904 markAssertionSet( assn1, assert ); 905 markAssertionSet( assn2, assert ); 906 } 905 907 } 906 908 } … … 1028 1030 1029 1031 void postvisit( const ast::TypeInstType * typeInst ) { 1030 assert( open.find( *typeInst) == open.end() );1032 assert( open.find( typeInst->name ) == open.end() ); 1031 1033 handleRefType( typeInst, type2 ); 1032 1034 } … … 1034 1036 private: 1035 1037 /// Creates a tuple type based on a list of Type 1036 static const ast::Type *tupleFromTypes(1038 static ast::ptr< ast::Type > tupleFromTypes( 1037 1039 const std::vector< ast::ptr< ast::Type > > & tys 1038 1040 ) { … … 1169 1171 auto var2 = dynamic_cast< const ast::TypeInstType * >( type2 ); 1170 1172 ast::OpenVarSet::const_iterator 1171 entry1 = var1 ? open.find( *var1) : open.end(),1172 entry2 = var2 ? open.find( *var2) : open.end();1173 entry1 = var1 ? open.find( var1->name ) : open.end(), 1174 entry2 = var2 ? open.find( var2->name ) : open.end(); 1173 1175 bool isopen1 = entry1 != open.end(); 1174 1176 bool isopen2 = entry2 != open.end();
Note: See TracChangeset
for help on using the changeset viewer.