Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
brmataptos committed Sep 30, 2024
1 parent 0f3224a commit 1782285
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,14 @@ pub fn check_for_function_typed_parameters(env: &mut GlobalEnv) {
if !func_returns.is_empty() {
// (2) is there a function type result at the top level? This is allowed
// only for LAMBDA_IN_RETURNS
if !lambda_return_ok {
if !func_returns.is_empty() {
env.diag(
Severity::Error,
&caller_func.get_result_type_loc(),
&format!("Functions may not return function-typed values, but function `{}` return type is the function type `{}`:",
&caller_name,
return_type.display(&type_display_ctx)),
)
}
if !lambda_return_ok && !func_returns.is_empty() {
env.diag(
Severity::Error,
&caller_func.get_result_type_loc(),
&format!("Functions may not return function-typed values, but function `{}` return type is the function type `{}`:",
&caller_name,
return_type.display(&type_display_ctx)),
)
}

Check warning on line 105 in third_party/move/move-compiler-v2/src/env_pipeline/function_checker.rs

View check run for this annotation

Codecov / codecov/patch

third_party/move/move-compiler-v2/src/env_pipeline/function_checker.rs#L105

Added line #L105 was not covered by tests
if !lambda_params_ok {
// (3) is there *any* function type with function type in an arg? This
Expand Down

0 comments on commit 1782285

Please sign in to comment.