Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/PtrsCastable.cc

    r4040425 r843054c2  
    1010// Created On       : Sun May 17 11:48:00 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 17:36:18 2016
    13 // Update Count     : 8
     12// Last Modified On : Sun May 17 11:51:17 2015
     13// Update Count     : 2
    1414//
    1515
     
    3636                virtual void visit(UnionInstType *inst);
    3737                virtual void visit(EnumInstType *inst);
    38                 virtual void visit(TraitInstType *inst);
     38                virtual void visit(ContextInstType *inst);
    3939                virtual void visit(TypeInstType *inst);
    4040                virtual void visit(TupleType *tupleType);
    41                 virtual void visit(VarArgsType *varArgsType);
    4241          private:
    4342                Type *dest;
     
    116115
    117116        void PtrsCastable::visit(EnumInstType *inst) {
    118                 if ( dynamic_cast< EnumInstType* >( dest ) ) {
     117                if ( dynamic_cast< EnumInstType* >( inst ) ) {
    119118                        result = 1;
    120                 } else if ( BasicType *bt = dynamic_cast< BasicType* >( dest ) ) {
     119                } else if ( BasicType *bt = dynamic_cast< BasicType* >( inst ) ) {
    121120                        if ( bt->get_kind() == BasicType::SignedInt ) {
    122121                                result = 0;
     
    129128        }
    130129
    131         void PtrsCastable::visit(TraitInstType *inst) {
     130        void PtrsCastable::visit(ContextInstType *inst) {
    132131                // I definitely don't think we should be doing anything here
    133132        }
    134133
    135134        void PtrsCastable::visit(TypeInstType *inst) {
    136                 result = objectCast( inst, env, indexer ) > 0 && objectCast( dest, env, indexer ) > 0 ? 1 : -1;
     135                result = objectCast( inst, env, indexer ) && objectCast( dest, env, indexer ) ? 1 : -1;
    137136        }
    138137
    139138        void PtrsCastable::visit(TupleType *tupleType) {
    140                 result = objectCast( dest, env, indexer );
    141         }
    142 
    143         void PtrsCastable::visit(VarArgsType *varArgsType) {
    144139                result = objectCast( dest, env, indexer );
    145140        }
Note: See TracChangeset for help on using the changeset viewer.