~eda-qa/leaflang/misc

« back to all changes in this revision

Viewing changes to src/lang/expression_typer/common.cpp

  • Committer: edA-qa mort-ora-y
  • Date: 2017-08-13 14:42:12 UTC
  • Revision ID: eda-qa@disemia.com-20170813144212-nwa1htc5hrs1na8t
several fixes for kata solution

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
 
251
251
shared_ptr<expression> process_block( shared_ptr<expr_block> expr, context ctx ) {
252
252
        expr->block->symbols->set_base( ctx.sc, scope::bt_local );
253
 
        ctx.proc_statement_block( expr->block );
 
253
        if( !ctx.proc_statement_block( expr->block ) ) {
 
254
                return expr;
 
255
        }
254
256
        
255
257
        if( expr->result ) {
256
258
                COND_PROC_EXPRESSION( expr->result, ctx, expr );
258
260
        } else {
259
261
                expr->type = extr_type(make_shared<intr_type_value_list>()); //no parts though
260
262
        }
261
 
        expr->mark_resolved();
 
263
        if( expr->type.is_resolved() ) {
 
264
                expr->mark_resolved();
 
265
        }
262
266
        return expr;
263
267
}
264
268