Changeset 6f326b1


Ignore:
Timestamp:
May 2, 2018, 11:44:47 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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, with_gc
Children:
30dcc47
Parents:
43bd69d
Message:

Add type variables from function alternative to the type environment for WaitforStmt?

Location:
src/ResolvExpr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.h

    r43bd69d r6f326b1  
    126126        void printAlts( const AltList &list, std::ostream &os, unsigned int indentAmt = 0 );
    127127
     128        /// Adds type variables to the open variable set and marks their assertions
     129        void makeUnifiableVars( Type *type, OpenVarSet &unifiableVars, AssertionSet &needAssertions );
     130
    128131        template< typename InputIterator >
    129132        void simpleCombineEnvironments( InputIterator begin, InputIterator end, TypeEnvironment &result ) {
  • src/ResolvExpr/Resolver.cc

    r43bd69d r6f326b1  
    544544                                                        OpenVarSet openVars;
    545545                                                        AssertionSet resultNeed, resultHave;
    546                                                         TypeEnvironment resultEnv;
     546                                                        TypeEnvironment resultEnv( func.env );
     547                                                        makeUnifiableVars( function, openVars, resultNeed );
     548                                                        // add all type variables as open variables now so that those not used in the parameter
     549                                                        // list are still considered open.
     550                                                        resultEnv.add( function->forall );
    547551
    548552                                                        // Load type variables from arguemnts into one shared space
Note: See TracChangeset for help on using the changeset viewer.