Changeset 6b8c4a8


Ignore:
Timestamp:
May 18, 2018, 5:41:57 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, with_gc
Children:
95642c9
Parents:
4d6d62e
Message:

Fix condition for keeping cast when converting to greater reference depth

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Lvalue.cc

    r4d6d62e r6b8c4a8  
    403403                                        ret = new AddressExpr( ret );
    404404                                }
    405                                 if ( srcType->get_lvalue() && srcType->get_qualifiers() != strict_dynamic_cast<ReferenceType *>( destType )->base->get_qualifiers() ) {
     405                                if ( srcType->get_lvalue() && ! ResolvExpr::typesCompatible( srcType, strict_dynamic_cast<ReferenceType *>( destType )->base, SymTab::Indexer() ) ) {
    406406                                        // must keep cast if cast-to type is different from the actual type
    407407                                        castExpr->arg = ret;
Note: See TracChangeset for help on using the changeset viewer.