bool type for binary operations (#5779)

* bool type for binary operations

* fixed type in commands
This commit is contained in:
Fernando Herrera
2022-06-14 20:31:14 -05:00
committed by GitHub
parent fe88d58b1e
commit 8d5848c955
4 changed files with 75 additions and 3 deletions

View File

@ -1872,6 +1872,16 @@ pub fn parse_full_cell_path(
.type_scope
.add_type(working_set.type_scope.get_last_output());
let ty = output
.pipelines
.last()
.and_then(|Pipeline { expressions, .. }| expressions.last())
.map(|expr| match expr.expr {
Expr::BinaryOp(..) => expr.ty.clone(),
_ => working_set.type_scope.get_last_output(),
})
.unwrap_or_else(|| working_set.type_scope.get_last_output());
error = error.or(err);
let block_id = working_set.add_block(output);
@ -1881,7 +1891,7 @@ pub fn parse_full_cell_path(
Expression {
expr: Expr::Subexpression(block_id),
span: head_span,
ty: working_set.type_scope.get_last_output(),
ty,
custom_completion: None,
},
true,