Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.cc

    ref1da0e2 rfc134a48  
    2222#include "ResolvExpr/Cost.h"             // for Cost
    2323#include "ResolvExpr/TypeEnvironment.h"  // for EqvClass, TypeEnvironment
    24 #include "ResolvExpr/Unify.h"
    2524#include "SymTab/Indexer.h"              // for Indexer
    2625#include "SynTree/Declaration.h"         // for TypeDecl, NamedTypeDecl
    2726#include "SynTree/Type.h"                // for Type, BasicType, TypeInstType
    2827#include "typeops.h"                     // for typesCompatibleIgnoreQualifiers
    29 
    3028
    3129namespace ResolvExpr {
     
    657655                                cost = Cost::safe;
    658656                        }
    659                 }
    660                 /*
    661                 else if ( const ast::FunctionType * dstFunc = dstAsPtr->base.as<ast::FunctionType>()) {
    662                         if (const ast::FunctionType * srcFunc = pointerType->base.as<ast::FunctionType>()) {
    663                                 if (dstFunc->params.empty() && dstFunc->isVarArgs ) {
    664                                         cost = Cost::unsafe; // assign any function to variadic fptr
    665                                 }
    666                         }
    667                         else {
    668                                 ast::AssertionSet need, have; // unused
    669                                 ast::OpenVarSet open;
    670                                 env.extractOpenVars(open);
    671                                 ast::TypeEnvironment tenv = env;
    672                                 if ( unify(dstAsPtr->base, pointerType->base, tenv, need, have, open, symtab) ) {
    673                                         cost = Cost::safe;
    674                                 }
    675                         }
    676                         // else infinity
    677                 }
    678                 */
    679                 else {
     657                } else {
    680658                        int assignResult = ptrsAssignable( pointerType->base, dstAsPtr->base, env );
    681659                        if ( 0 < assignResult && tq1 <= tq2 ) {
Note: See TracChangeset for help on using the changeset viewer.