Ignore:
Timestamp:
Nov 15, 2016, 5:30:52 PM (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, resolv-new, with_gc
Children:
d9fa60a
Parents:
8f9cc50
Message:

changed use of formal types to actual types for boxing return parameters and passing type variables, fix bug where generic struct's members would change types when a member is accessed on a concrete instantiation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/GenPoly.cc

    r8f9cc50 r33a7b6d  
    9292        }
    9393
    94         Type *isDynType( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env ) {
     94        ReferenceToType *isDynType( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env ) {
    9595                type = replaceTypeInst( type, env );
    9696
     
    9898                        auto var = tyVars.find( typeInst->get_name() );
    9999                        if ( var != tyVars.end() && var->second == TypeDecl::Any ) {
    100                                 return type;
     100                                return typeInst;
    101101                        }
    102102                } else if ( StructInstType *structType = dynamic_cast< StructInstType* >( type ) ) {
    103                         if ( hasDynParams( structType->get_parameters(), tyVars, env ) ) return type;
     103                        if ( hasDynParams( structType->get_parameters(), tyVars, env ) ) return structType;
    104104                } else if ( UnionInstType *unionType = dynamic_cast< UnionInstType* >( type ) ) {
    105                         if ( hasDynParams( unionType->get_parameters(), tyVars, env ) ) return type;
     105                        if ( hasDynParams( unionType->get_parameters(), tyVars, env ) ) return unionType;
    106106                }
    107107                return 0;
Note: See TracChangeset for help on using the changeset viewer.