Changeset d8938622 for src/AST/Expr.cpp


Ignore:
Timestamp:
May 22, 2019, 3:38:47 PM (3 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
6380f78
Parents:
37eef7a
Message:

Broken GenericSubstitution? version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.cpp

    r37eef7a rd8938622  
    2020#include <vector>
    2121
     22#include "GenericSubstitution.hpp"
    2223#include "Stmt.hpp"
    2324#include "Type.hpp"
     25#include "TypeSubstitution.hpp"
    2426#include "Common/utility.h"
    2527#include "Common/SemanticError.h"
     
    157159        assert( aggregate->result );
    158160
    159         assert(!"unimplemented; need TypeSubstitution, genericSubstitution");
     161        // take ownership of member type
     162        Type * res = result.set_and_mutate( mem->get_type() );
     163        // substitute aggregate generic parameters into member type
     164        genericSubsitution( aggregate->result ).apply( res );
     165        // ensure lvalue and appropriate restrictions from aggregate type
     166        res->set_lvalue( true );
     167        res->qualifiers |= aggregate->result->qualifiers;
     168        // ensure changes propegated back into result
     169        result = res;
    160170}
    161171
Note: See TracChangeset for help on using the changeset viewer.