Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.cc

    r98278b3a reddb399  
    275275                        // xxx - not positive this is correct, but appears to allow casting int => enum
    276276                        cost = Cost::unsafe;
    277                 } // if
    278                 // no cases for zero_t/one_t because it should not be possible to convert int, etc. to zero_t/one_t.
     277                } else if ( dynamic_cast< ZeroType* >( dest ) != nullptr || dynamic_cast< OneType* >( dest ) != nullptr ) {
     278                        cost = Cost::unsafe;
     279                } // if
    279280        }
    280281
     
    308309                                // assignResult == 0 means Cost::Infinity
    309310                        } // if
    310                         // case case for zero_t because it should not be possible to convert pointers to zero_t.
     311                } else if ( dynamic_cast< ZeroType * >( dest ) ) {
     312                        cost = Cost::unsafe;
    311313                } // if
    312314        }
Note: See TracChangeset for help on using the changeset viewer.