Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/GenericParameter.cpp

    rf02f546 r7a780ad  
    289289                return new ast::TypeExpr( expr->location,
    290290                        new ast::ArrayType(
    291                                 new ast::BasicType( ast::BasicType::Char ),
     291                                new ast::BasicType( ast::BasicKind::Char ),
    292292                                expr,
    293293                                ast::VariableLen,
     
    301301const ast::Expr * TranslateDimensionCore::postvisit(
    302302                const ast::TypeExpr * expr ) {
    303         // Does nothing, except prevents matching ast::Expr (above).
     303        if ( auto instType = dynamic_cast<const ast::EnumInstType *>( expr->type.get() ) ) {
     304                const ast::EnumDecl * baseEnum = instType->base.get();
     305                return ast::ConstantExpr::from_int( expr->location, baseEnum->members.size() );
     306        }
    304307        return expr;
    305308}
Note: See TracChangeset for help on using the changeset viewer.