Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.cpp

    r10a1225 r20a5977  
    2020#include <vector>
    2121
     22#include "GenericSubstitution.hpp"
    2223#include "Stmt.hpp"
    2324#include "Type.hpp"
     25#include "TypeSubstitution.hpp"
     26#include "Common/utility.h"
    2427#include "Common/SemanticError.h"
    2528#include "GenPoly/Lvalue.h"        // for referencesPermissable
     
    156159        assert( aggregate->result );
    157160
    158         assert(!"unimplemented; need TypeSubstitution, genericSubstitution");
     161        // take ownership of member type
     162        result = mem->get_type();
     163        // substitute aggregate generic parameters into member type
     164        genericSubsitution( aggregate->result ).apply( result );
     165        // ensure lvalue and appropriate restrictions from aggregate type
     166        result.get_and_mutate()->qualifiers |= aggregate->result->qualifiers | CV::Lvalue;
    159167}
    160168
     
    233241                        FixedLen, DynamicDim },
    234242                std::string{"\""} + s + "\"",
    235                 (unsigned long long)0 };
     243                (unsigned long long)0,
     244                ConstantExpr::String };
    236245}
    237246
     
    332341        stmts.emplace_back( new ExprStmt{ loc, tupleExpr } );
    333342        stmtExpr = new StmtExpr{ loc, new CompoundStmt{ loc, std::move(stmts) } };
     343}
     344
     345TupleAssignExpr::TupleAssignExpr(
     346        const CodeLocation & loc, const Type * result, const StmtExpr * s )
     347: Expr( loc, result ), stmtExpr() {
     348        stmtExpr = s;
    334349}
    335350
Note: See TracChangeset for help on using the changeset viewer.