- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/TypeEnvironment.cc
r98a249fb r09c72d5 118 118 env.push_back( newClass ); 119 119 } // for 120 } 121 122 void TypeEnvironment::add( const TypeSubstitution & sub ) { 123 EqvClass newClass; 124 for ( auto p : sub ) { 125 newClass.vars.insert( p.first ); 126 newClass.type = p.second->clone(); 127 newClass.allowWidening = false; 128 // Minimal assumptions. Not technically correct, but might be good enough, and 129 // is the best we can do at the moment since information is lost in the 130 // transition to TypeSubstitution 131 newClass.data = TypeDecl::Data{ TypeDecl::Dtype, false }; 132 add( newClass ); 133 } 120 134 } 121 135
Note: See TracChangeset
for help on using the changeset viewer.