~garritfra/antimony

874b6e6805edb44f56f1b5043097ce589cc5541e — Garrit Franke 6 months ago 0df2544
fix: formatting
1 files changed, 4 insertions(+), 2 deletions(-)

M src/parser/infer.rs
M src/parser/infer.rs => src/parser/infer.rs +4 -2
@@ 64,7 64,10 @@ fn infer_array(elements: &[Expression], table: &SymbolTable) -> Option<Type> {

    // TODO: This approach only relies on the first element.
    // It will not catch that types are possibly inconsistent.
    types.first().and_then(|ty| ty.to_owned()).map(|ty| Type::Array(Box::new(ty), Some(types.len())))
    types
        .first()
        .and_then(|ty| ty.to_owned())
        .map(|ty| Type::Array(Box::new(ty), Some(types.len())))
}

fn infer_function_call(name: &str, table: &SymbolTable) -> Option<Type> {


@@ 73,4 76,3 @@ fn infer_function_call(name: &str, table: &SymbolTable) -> Option<Type> {
        None => None,
    }
}