Changeset 12df6fe for src/ResolvExpr


Ignore:
Timestamp:
Sep 19, 2022, 11:48:13 AM (20 months ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
4520b77e
Parents:
b0d9ff7
Message:

Fix an enumerator value bug; add basic tests for new features; save the current progress before merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    rb0d9ff7 r12df6fe  
    14781478                        // enum type is still incomplete at this point. Use `int` instead.
    14791479
    1480                         if (dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() )->base->base) {
     1480                        if ( auto enumBase = dynamic_cast< const ast::EnumInstType * >
     1481                                ( objectDecl->get_type() )->base->base ) {
    14811482                                objectDecl = fixObjectType( objectDecl, context );
    1482                                 const ast::Type * enumBase =  (dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() )->base->base.get());
    14831483                                currentObject = ast::CurrentObject{
    14841484                                        objectDecl->location,
     
    14931493                }
    14941494                else {
    1495                         if (!objectDecl->isTypeFixed) {
     1495                        if ( !objectDecl->isTypeFixed ) {
    14961496                                auto newDecl = fixObjectType(objectDecl, context);
    14971497                                auto mutDecl = mutate(newDecl);
Note: See TracChangeset for help on using the changeset viewer.