Ignore:
Timestamp:
Jan 31, 2024, 6:25:02 PM (8 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
32490deb
Parents:
16afb2a
Message:

Introduce posE, valueE, labelE pseudo language to the language. Rework the internal representation of enumeration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Unify.cc

    r16afb2a rc75b30a  
    7373                ast::Type * newFirst  = shallowCopy( first  );
    7474                ast::Type * newSecond = shallowCopy( second );
    75                 if ( auto temp = dynamic_cast<const ast::EnumInstType *>(first) ) {
    76                         if ( !dynamic_cast< const ast::EnumInstType * >( second ) ) {
    77                                 const ast::EnumDecl * baseEnum = dynamic_cast<const ast::EnumDecl *>(temp->base.get());
    78                                 if ( auto t = baseEnum->base.get() ) {
    79                                         newFirst = ast::shallowCopy( t );
    80                                 }
    81                         }
    82                 } else if ( auto temp = dynamic_cast<const ast::EnumInstType *>(second) ) {
    83                         const ast::EnumDecl * baseEnum = dynamic_cast<const ast::EnumDecl *>(temp->base.get());
    84                         if ( auto t = baseEnum->base.get() ) {
    85                                 newSecond = ast::shallowCopy( t );
    86                         }
    87                 }
    8875
    8976                newFirst ->qualifiers = {};
Note: See TracChangeset for help on using the changeset viewer.