Changeset 03c56f6 for src


Ignore:
Timestamp:
Nov 1, 2022, 4:58:01 PM (18 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
e50d9cb8
Parents:
75f6a5f
Message:

Cleaning old box pass for easier translation. Another change, this one replaced an error with an assertion based on a comment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r75f6a5f r03c56f6  
    550550                                if ( tyParam.second.isComplete ) {
    551551                                        Type *concrete = env->lookup( tyParam.first );
    552                                         if ( concrete ) {
    553                                                 arg = appExpr->get_args().insert( arg, new SizeofExpr( concrete->clone() ) );
    554                                                 arg++;
    555                                                 arg = appExpr->get_args().insert( arg, new AlignofExpr( concrete->clone() ) );
    556                                                 arg++;
    557                                         } else {
    558                                                 // xxx - should this be an assertion?
    559                                                 SemanticError( appExpr, toString( *env, "\nunbound type variable: ", tyParam.first, " in application " ) );
    560                                         } // if
     552                                        // If there is an unbound type variable, it should have detected already.
     553                                        assertf( concrete, "Unbound type variable: %s in: %s",
     554                                                toCString( tyParam.first ), toCString( *env ) );
     555
     556                                        arg = appExpr->get_args().insert( arg, new SizeofExpr( concrete->clone() ) );
     557                                        arg++;
     558                                        arg = appExpr->get_args().insert( arg, new AlignofExpr( concrete->clone() ) );
     559                                        arg++;
    561560                                } // if
    562561                        } // for
Note: See TracChangeset for help on using the changeset viewer.