Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r5cf1228 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);
     
    15421542        }
    15431543
     1544
    15441545        const ast::StaticAssertDecl * Resolver_new::previsit(
    15451546                const ast::StaticAssertDecl * assertDecl
     
    15531554        const PtrType * handlePtrType( const PtrType * type, const ResolveContext & context ) {
    15541555                if ( type->dimension ) {
    1555                         const ast::Type * sizeType = context.global.sizeType.get();
     1556                        ast::ptr< ast::Type > sizeType = context.global.sizeType;
    15561557                        ast::ptr< ast::Expr > dimension = findSingleExpression( type->dimension, sizeType, context );
    15571558                        assertf(dimension->env->empty(), "array dimension expr has nonempty env");
    15581559                        dimension.get_and_mutate()->env = nullptr;
    1559                         ast::mutate_field( type, &PtrType::dimension, dimension );
     1560                        ast::mutate_field(
     1561                                type, &PtrType::dimension,
     1562                                dimension);
    15601563                }
    15611564                return type;
Note: See TracChangeset for help on using the changeset viewer.