Ignore:
Timestamp:
Aug 31, 2023, 5:51:00 PM (9 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
2a301ff
Parents:
c84dd61
Message:

Array can use enum instance with explicit initializer as designator. More general case will be covered in later commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    rc84dd61 r92355883  
    15071507                                if ( InitTweak::tryConstruct( mutDecl ) && ( managedTypes.isManaged( mutDecl ) || ((! isInFunction() || mutDecl->storage.is_static ) && ! InitTweak::isConstExpr( mutDecl->init ) ) ) ) {
    15081508                                        // constructed objects cannot be designated
    1509                                         if ( InitTweak::isDesignated( mutDecl->init ) ) SemanticError( mutDecl, "Cannot include designations in the initializer for a managed Object. If this is really what you want, then initialize with @=.\n" );
     1509                                        // if ( InitTweak::isDesignated( mutDecl->init ) ) SemanticError( mutDecl, "Cannot include designations in the initializer for a managed Object. If this is really what you want, then initialize with @=.\n" );
     1510                                        if ( InitTweak::isDesignated( mutDecl->init ) ) {
     1511                                                SemanticError( mutDecl, "Cannot include designations in the initializer for a managed Object. If this is really what you want, then initialize with @=.\n" );
     1512                                        }
    15101513                                        // constructed objects should not have initializers nested too deeply
    15111514                                        if ( ! InitTweak::checkInitDepth( mutDecl ) ) SemanticError( mutDecl, "Managed object's initializer is too deep " );
Note: See TracChangeset for help on using the changeset viewer.