Changeset 30aeb27 for src/GenPoly


Ignore:
Timestamp:
Feb 17, 2016, 4:40:26 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
4318107
Parents:
a73d57a
Message:

Fix makeAdapterArg() to account for polymorphic generic types

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    ra73d57a r30aeb27  
    637637                        assert( arg );
    638638                        if ( isPolyType( realParam->get_type(), tyVars ) ) {
    639                                 if ( dynamic_cast<TypeInstType *>(arg->get_type()) == NULL ) {
     639                                if ( ! isPolyType( arg->get_type() ) ) {
    640640                                        UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
    641641                                        deref->get_args().push_back( new CastExpr( new VariableExpr( param ), new PointerType( Type::Qualifiers(), arg->get_type()->clone() ) ) );
Note: See TracChangeset for help on using the changeset viewer.