Changeset d7dc824 for src/ResolvExpr/Unify.cc
- Timestamp:
- Jun 7, 2017, 4:53:42 PM (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:
- c77fd8b, ec95d11
- Parents:
- af397ef8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Unify.cc
raf397ef8 rd7dc824 114 114 } 115 115 116 bool isFtype( Type *type , const SymTab::Indexer &indexer) {116 bool isFtype( Type *type ) { 117 117 if ( dynamic_cast< FunctionType* >( type ) ) { 118 118 return true; … … 123 123 } 124 124 125 bool tyVarCompatible( const TypeDecl::Data & data, Type *type , const SymTab::Indexer &indexer) {125 bool tyVarCompatible( const TypeDecl::Data & data, Type *type ) { 126 126 switch ( data.kind ) { 127 127 case TypeDecl::Any: … … 131 131 // type must also be complete 132 132 // xxx - should this also check that type is not a tuple type and that it's not a ttype? 133 return ! isFtype( type , indexer) && (! data.isComplete || type->isComplete() );133 return ! isFtype( type ) && (! data.isComplete || type->isComplete() ); 134 134 case TypeDecl::Ftype: 135 return isFtype( type , indexer);135 return isFtype( type ); 136 136 case TypeDecl::Ttype: 137 137 // ttype unifies with any tuple type … … 144 144 OpenVarSet::const_iterator tyvar = openVars.find( typeInst->get_name() ); 145 145 assert( tyvar != openVars.end() ); 146 if ( ! tyVarCompatible( tyvar->second, other , indexer) ) {146 if ( ! tyVarCompatible( tyvar->second, other ) ) { 147 147 return false; 148 148 } // if
Note: See TracChangeset
for help on using the changeset viewer.