Changeset 24d6572 for src/ResolvExpr/SatisfyAssertions.cpp
- Timestamp:
- Jun 12, 2023, 2:45:32 PM (14 months ago)
- Branches:
- ast-experimental, master
- Children:
- 62d62db
- Parents:
- 34b4268 (diff), 251ce80 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/SatisfyAssertions.cpp
r34b4268 r24d6572 24 24 #include <vector> 25 25 26 #include "AdjustExprType.hpp" 26 27 #include "Candidate.hpp" 27 28 #include "CandidateFinder.hpp" 29 #include "CommonType.hpp" 28 30 #include "Cost.h" 29 31 #include "RenameVars.h" 32 #include "SpecCost.hpp" 30 33 #include "typeops.h" 31 34 #include "Unify.h" … … 181 184 .strict_as<ast::FunctionType>()->params[0] 182 185 .strict_as<ast::ReferenceType>()->base; 183 sat.cand->env.apply(thisArgType); 186 // sat.cand->env.apply(thisArgType); 187 188 if (auto inst = thisArgType.as<ast::TypeInstType>()) { 189 auto cls = sat.cand->env.lookup(*inst); 190 if (cls && cls->bound) thisArgType = cls->bound; 191 } 184 192 185 193 std::string otypeKey = ""; … … 218 226 ast::TypeEnvironment tempNewEnv {newEnv}; 219 227 220 if ( unifyExact( toType, adjType, tempNewEnv, newNeed, have, newOpen, WidenMode {true, true} , sat.symtab) ) {228 if ( unifyExact( toType, adjType, tempNewEnv, newNeed, have, newOpen, WidenMode {true, true} ) ) { 221 229 // set up binding slot for recursive assertions 222 230 ast::UniqueId crntResnSlot = 0; … … 234 242 // newEnv = sat.cand->env; 235 243 // newNeed.clear(); 236 if ( auto c = commonType( toType, adjType, newEnv, newNeed, have, newOpen, WidenMode {true, true} , sat.symtab) ) {244 if ( auto c = commonType( toType, adjType, newEnv, newNeed, have, newOpen, WidenMode {true, true} ) ) { 237 245 // set up binding slot for recursive assertions 238 246 ast::UniqueId crntResnSlot = 0; … … 398 406 mergeOpenVars( open, i.match.open ); 399 407 400 if ( ! env.combine( i.match.env, open , symtab) ) return false;408 if ( ! env.combine( i.match.env, open ) ) return false; 401 409 402 410 crnt.emplace_back( i );
Note: See TracChangeset
for help on using the changeset viewer.