Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    rb107885 r2dda05d  
    986986                };
    987987        } // anonymous namespace
     988
    988989        /// Check if this expression is or includes a deleted expression
    989990        const ast::DeletedExpr * findDeletedExpr( const ast::Expr * expr ) {
     
    13741375                        }
    13751376
    1376                         // handle assertions
     1377                        // handle assertions. (seems deep)
    13771378
    13781379                        symtab.enterScope();
    1379                         mutType->forall.clear();
    1380                         mutType->assertions.clear();
    1381                         for (auto & typeParam : mutDecl->type_params) {
    1382                                 symtab.addType(typeParam);
    1383                                 mutType->forall.emplace_back(new ast::TypeInstType(typeParam->name, typeParam));
    1384                         }
    1385                         for (auto & asst : mutDecl->assertions) {
    1386                                 asst = fixObjectType(asst.strict_as<ast::ObjectDecl>(), symtab);
    1387                                 symtab.addId(asst);
    1388                                 mutType->assertions.emplace_back(new ast::VariableExpr(functionDecl->location, asst));
     1380                        for (auto & typeParam : mutType->forall) {
     1381                                auto mutParam = typeParam.get_and_mutate();
     1382                                symtab.addType(mutParam);
     1383                                for (auto & asst : mutParam->assertions) {
     1384                                        asst = fixObjectType(asst.strict_as<ast::ObjectDecl>(), symtab);
     1385                                        symtab.addId(asst);
     1386                                }
     1387                                typeParam = mutParam;
    13891388                        }
    13901389
     
    14081407                        mutType->returns = std::move(returnTypes);
    14091408
    1410                         auto renamedType = strict_dynamic_cast<const ast::FunctionType *>(renameTyVars(mutType, RenameMode::GEN_EXPR_ID));
    1411 
    14121409                        std::list<ast::ptr<ast::Stmt>> newStmts;
    14131410                        resolveWithExprs (mutDecl->withExprs, newStmts);
     
    14211418                        symtab.leaveScope();
    14221419
    1423                         mutDecl->type = renamedType;
    14241420                        mutDecl->mangleName = Mangle::mangle(mutDecl);
    14251421                        mutDecl->isTypeFixed = true;
     
    15381534        const PtrType * handlePtrType( const PtrType * type, const ast::SymbolTable & symtab ) {
    15391535                if ( type->dimension ) {
    1540                         ast::ptr< ast::Type > sizeType = ast::sizeType;
     1536                        #warning should use new equivalent to Validate::SizeType rather than sizeType here
     1537                        ast::ptr< ast::Type > sizeType = new ast::BasicType{ ast::BasicType::LongUnsignedInt };
    15411538                        ast::mutate_field(
    15421539                                type, &PtrType::dimension,
Note: See TracChangeset for help on using the changeset viewer.