Changeset 825170d


Ignore:
Timestamp:
Jul 13, 2018, 11:35:59 AM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
610194e
Parents:
04cccaf
Message:

Fix commonType for pointers to place qualifiers on base type [fixes #100]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CommonType.cc

    r04cccaf r825170d  
    267267                                                result = otherPointer->clone();
    268268                                        } // if
    269                                         result->get_qualifiers() = tq1 | tq2;
     269                                        strict_dynamic_cast<PointerType*>(result)->base->get_qualifiers() = tq1 | tq2;
    270270                                } else {
    271271                                        /// std::cerr << "place for ptr-to-type" << std::endl;
     
    304304                                                result = otherRef->clone();
    305305                                        } // if
    306                                         result->get_qualifiers() = tq1 | tq2;
     306                                        strict_dynamic_cast<ReferenceType*>(result)->base->get_qualifiers() = tq1 | tq2;
    307307                                } else {
    308308                                        /// std::cerr << "place for ptr-to-type" << std::endl;
Note: See TracChangeset for help on using the changeset viewer.