Changes in src/ResolvExpr/Resolver.cc [12df6fe:5cf1228]
- File:
-
- 1 edited
-
src/ResolvExpr/Resolver.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
r12df6fe r5cf1228 1478 1478 // enum type is still incomplete at this point. Use `int` instead. 1479 1479 1480 if ( auto enumBase = dynamic_cast< const ast::EnumInstType * > 1481 ( objectDecl->get_type() )->base->base ) { 1480 if (dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() )->base->base) { 1482 1481 objectDecl = fixObjectType( objectDecl, context ); 1482 const ast::Type * enumBase = (dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() )->base->base.get()); 1483 1483 currentObject = ast::CurrentObject{ 1484 1484 objectDecl->location, … … 1493 1493 } 1494 1494 else { 1495 if ( !objectDecl->isTypeFixed) {1495 if (!objectDecl->isTypeFixed) { 1496 1496 auto newDecl = fixObjectType(objectDecl, context); 1497 1497 auto mutDecl = mutate(newDecl); … … 1542 1542 } 1543 1543 1544 1545 1544 const ast::StaticAssertDecl * Resolver_new::previsit( 1546 1545 const ast::StaticAssertDecl * assertDecl … … 1554 1553 const PtrType * handlePtrType( const PtrType * type, const ResolveContext & context ) { 1555 1554 if ( type->dimension ) { 1556 ast::ptr< ast::Type > sizeType = context.global.sizeType;1555 const ast::Type * sizeType = context.global.sizeType.get(); 1557 1556 ast::ptr< ast::Expr > dimension = findSingleExpression( type->dimension, sizeType, context ); 1558 1557 assertf(dimension->env->empty(), "array dimension expr has nonempty env"); 1559 1558 dimension.get_and_mutate()->env = nullptr; 1560 ast::mutate_field( 1561 type, &PtrType::dimension, 1562 dimension); 1559 ast::mutate_field( type, &PtrType::dimension, dimension ); 1563 1560 } 1564 1561 return type;
Note:
See TracChangeset
for help on using the changeset viewer.