Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/PtrsCastable.cc

    r1521de20 r4040425  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 11:48:00 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Oct 05 14:49:12 2015
    13 // Update Count     : 7
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Mar  2 17:36:18 2016
     13// Update Count     : 8
    1414//
    1515
     
    3636                virtual void visit(UnionInstType *inst);
    3737                virtual void visit(EnumInstType *inst);
    38                 virtual void visit(ContextInstType *inst);
     38                virtual void visit(TraitInstType *inst);
    3939                virtual void visit(TypeInstType *inst);
    4040                virtual void visit(TupleType *tupleType);
     41                virtual void visit(VarArgsType *varArgsType);
    4142          private:
    4243                Type *dest;
     
    115116
    116117        void PtrsCastable::visit(EnumInstType *inst) {
    117                 if ( dynamic_cast< EnumInstType* >( inst ) ) {
     118                if ( dynamic_cast< EnumInstType* >( dest ) ) {
    118119                        result = 1;
    119                 } else if ( BasicType *bt = dynamic_cast< BasicType* >( inst ) ) {
     120                } else if ( BasicType *bt = dynamic_cast< BasicType* >( dest ) ) {
    120121                        if ( bt->get_kind() == BasicType::SignedInt ) {
    121122                                result = 0;
     
    128129        }
    129130
    130         void PtrsCastable::visit(ContextInstType *inst) {
     131        void PtrsCastable::visit(TraitInstType *inst) {
    131132                // I definitely don't think we should be doing anything here
    132133        }
     
    139140                result = objectCast( dest, env, indexer );
    140141        }
     142
     143        void PtrsCastable::visit(VarArgsType *varArgsType) {
     144                result = objectCast( dest, env, indexer );
     145        }
    141146} // namespace ResolvExpr
    142147
Note: See TracChangeset for help on using the changeset viewer.