Changeset 8e1467d


Ignore:
Timestamp:
Sep 17, 2019, 2:36:12 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:
4a60488
Parents:
4e13e2a
Message:

Fixed crash using shallow copy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CurrentObject.cc

    r4e13e2a r8e1467d  
    2121#include <string>                      // for string, operator<<, allocator
    2222
     23#include "AST/Copy.hpp"                // for shallowCopy
    2324#include "AST/Expr.hpp"                // for InitAlternative
    2425#include "AST/GenericSubstitution.hpp" // for genericSubstitution
     
    804805                                                new VariableExpr{ location, curMember->strict_as< ObjectDecl >() } );
    805806                                        // need to substitute for generic types so that casts are to concrete types
     807                                        alt.type = shallowCopy(alt.type.get());
    806808                                        PRINT( std::cerr << "  type is: " << alt.type; )
    807809                                        sub.apply( alt.type ); // also apply to designation??
Note: See TracChangeset for help on using the changeset viewer.