forked from extern/nushell
Remove unsued types (#14916)
# Description `Type::Block` and `Type::Signature` do not correspond to any `Value` cases and should be able to be removed.
This commit is contained in:
@ -2259,7 +2259,7 @@ pub fn parse_module(
|
||||
module_comments.extend(inner_comments);
|
||||
let module_id = working_set.add_module(&module_name, module, module_comments);
|
||||
|
||||
let block_expr = Expression::new(working_set, Expr::Block(block_id), block_span, Type::Block);
|
||||
let block_expr = Expression::new(working_set, Expr::Block(block_id), block_span, Type::Any);
|
||||
|
||||
let module_decl_id = working_set
|
||||
.find_decl(b"module")
|
||||
|
@ -3498,7 +3498,7 @@ pub fn parse_signature(working_set: &mut StateWorkingSet, span: Span) -> Express
|
||||
|
||||
let sig = parse_signature_helper(working_set, Span::new(start, end));
|
||||
|
||||
Expression::new(working_set, Expr::Signature(sig), span, Type::Signature)
|
||||
Expression::new(working_set, Expr::Signature(sig), span, Type::Any)
|
||||
}
|
||||
|
||||
pub fn parse_signature_helper(working_set: &mut StateWorkingSet, span: Span) -> Box<Signature> {
|
||||
@ -4471,7 +4471,7 @@ pub fn parse_block_expression(working_set: &mut StateWorkingSet, span: Span) ->
|
||||
|
||||
let block_id = working_set.add_block(Arc::new(output));
|
||||
|
||||
Expression::new(working_set, Expr::Block(block_id), span, Type::Block)
|
||||
Expression::new(working_set, Expr::Block(block_id), span, Type::Any)
|
||||
}
|
||||
|
||||
pub fn parse_match_block_expression(working_set: &mut StateWorkingSet, span: Span) -> Expression {
|
||||
|
@ -55,7 +55,6 @@ pub fn type_compatible(lhs: &Type, rhs: &Type) -> bool {
|
||||
(Type::Int, Type::Number) => true,
|
||||
(Type::Number, Type::Float) => true,
|
||||
(Type::Float, Type::Number) => true,
|
||||
(Type::Closure, Type::Block) => true,
|
||||
(Type::Any, _) => true,
|
||||
(_, Type::Any) => true,
|
||||
(Type::Record(lhs), Type::Record(rhs)) | (Type::Table(lhs), Type::Table(rhs)) => {
|
||||
|
Reference in New Issue
Block a user