Changeset 7215000 for src/ResolvExpr


Ignore:
Timestamp:
Apr 16, 2020, 1:25:53 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b5276fc
Parents:
41af19c
Message:

Added flag to disable non-deteministic parts of the output when testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/TypeEnvironment.cc

    r41af19c r7215000  
    2020#include <utility>                     // for pair, move
    2121
     22#include "CompilationState.h"          // for deterministic_output
    2223#include "Common/utility.h"            // for maybeClone
    2324#include "SynTree/Type.h"              // for Type, FunctionType, Type::Fora...
     
    106107
    107108        void EqvClass::print( std::ostream &os, Indenter indent ) const {
    108                 os << "( ";
    109                 std::copy( vars.begin(), vars.end(), std::ostream_iterator< std::string >( os, " " ) );
    110                 os << ")";
     109                if( !deterministic_output ) {
     110                        os << "( ";
     111                        std::copy( vars.begin(), vars.end(), std::ostream_iterator< std::string >( os, " " ) );
     112                        os << ")";
     113                }
    111114                if ( type ) {
    112115                        os << " -> ";
     
    235238                // check safely bindable
    236239                if ( r.type && occursIn( r.type, s.vars.begin(), s.vars.end(), *this ) ) return false;
    237                
     240
    238241                // merge classes in
    239242                r.vars.insert( s.vars.begin(), s.vars.end() );
Note: See TracChangeset for help on using the changeset viewer.