- Timestamp:
- Feb 16, 2022, 11:33:08 AM (2 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 7d7ef6f
- Parents:
- 9490621
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/TypeSubstitution.cc
r9490621 r51b8582 146 146 } 147 147 148 static bool are_same( TypeInstType * left, TypeInstType * right ) { 149 if ( left->baseType && right->baseType ) { 150 return left->baseType == right->baseType; 151 } else { 152 return left->name == right->name; 153 } 154 } 155 148 156 Type * TypeSubstitution::Substituter::postmutate( TypeInstType *inst ) { 149 157 BoundVarsType::const_iterator bound = boundVars.find( inst->name ); … … 158 166 // TODO: investigate preventing type variables from being bound to themselves in the first place. 159 167 if ( TypeInstType * replacement = dynamic_cast< TypeInstType * >( i->second ) ) { 160 if ( inst->name == replacement->name) {168 if ( are_same( inst, replacement ) ) { 161 169 return inst; 162 170 } -
src/Validate/ForallPointerDecay.cpp
r9490621 r51b8582 177 177 } 178 178 auto mut = ast::mutate( decl ); 179 //mut->assertions = expandAssertions( decl->assertions ); 180 mut->assertions = expandAssertions_DR( decl->type_params, decl->assertions ); 179 mut->assertions = expandAssertions( decl->assertions ); 181 180 auto mutType = ast::mutate( mut->type.get() ); 182 181 // * … … 209 208 } 210 209 return ast::mutate_field( decl, &ast::StructDecl::params, 211 //expandTypeDecls( decl->params ) ); 212 expandTypeDecls_DR( decl->params ) ); 210 expandTypeDecls( decl->params ) ); 213 211 } 214 212 … … 218 216 } 219 217 return ast::mutate_field( decl, &ast::UnionDecl::params, 220 //expandTypeDecls( decl->params ) ); 221 expandTypeDecls_DR( decl->params ) ); 218 expandTypeDecls( decl->params ) ); 222 219 } 223 220 };
Note: See TracChangeset
for help on using the changeset viewer.