Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Unify.cc

    r302ef2a r361bf01  
    773773
    774774                        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 ) ) {
    776776                                        // expand ttype parameter into its actual type
    777777                                        if ( clz->data.kind == ast::TypeDecl::Ttype && clz->bound ) {
     
    811811                /// Creates a tuple type based on a list of DeclWithType
    812812                template< typename Iter >
    813                 static const ast::Type * tupleFromTypes( Iter crnt, Iter end ) {
     813                static ast::ptr< ast::Type > tupleFromTypes( Iter crnt, Iter end ) {
    814814                        std::vector< ast::ptr< ast::Type > > types;
    815815                        while ( crnt != end ) {
     
    821821                        }
    822822
    823                         return new ast::TupleType{ std::move(types) };
     823                        return { new ast::TupleType{ std::move(types) } };
    824824                }
    825825
     
    888888                }
    889889
    890                 static void markAssertionSet( ast::AssertionSet & assns, const ast::VariableExpr * assn ) {
     890                static void markAssertionSet( ast::AssertionSet & assns, const ast::DeclWithType * assn ) {
    891891                        auto i = assns.find( assn );
    892892                        if ( i != assns.end() ) {
     
    900900                        const ast::FunctionType * type
    901901                ) {
    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                                }
    905907                        }
    906908                }
     
    10281030
    10291031                void postvisit( const ast::TypeInstType * typeInst ) {
    1030                         assert( open.find( *typeInst ) == open.end() );
     1032                        assert( open.find( typeInst->name ) == open.end() );
    10311033                        handleRefType( typeInst, type2 );
    10321034                }
     
    10341036        private:
    10351037                /// Creates a tuple type based on a list of Type
    1036                 static const ast::Type * tupleFromTypes(
     1038                static ast::ptr< ast::Type > tupleFromTypes(
    10371039                        const std::vector< ast::ptr< ast::Type > > & tys
    10381040                ) {
     
    11691171                auto var2 = dynamic_cast< const ast::TypeInstType * >( type2 );
    11701172                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();
    11731175                bool isopen1 = entry1 != open.end();
    11741176                bool isopen2 = entry2 != open.end();
Note: See TracChangeset for help on using the changeset viewer.