Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes argument errors not displayed. #5909

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

esdrubal
Copy link
Contributor

@esdrubal esdrubal commented Apr 23, 2024

Description

type_check_method_application does the parsing of arguments in 2 passes, but when the resolved_method_name failed the argument error would not be displayed.

We now store the arg_handlers and append their errors in case resolve_method_name fails.

Fixes #5660

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

type_check_method_application does the parsing of arguments in 2 passes,
but when the resolved_method_name failed the argument error would not be displayed.

We now store the arg_handlers and append their errors in case resolve_method_name fails.

Fixes #5660
@esdrubal esdrubal self-assigned this Apr 23, 2024
@esdrubal esdrubal added compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen bug Something isn't working labels Apr 23, 2024
Copy link

Benchmark for 60e752f

Click to view benchmark
Test Base PR %
code_action 5.3±0.06ms 5.4±0.21ms +1.89%
code_lens 337.4±10.48ns 326.6±17.31ns -3.20%
compile 6.2±0.03s 6.2±0.06s 0.00%
completion 4.8±0.15ms 4.9±0.10ms +2.08%
did_change_with_caching 6.2±0.12s 6.1±0.08s -1.61%
document_symbol 938.6±46.91µs 1066.6±16.94µs +13.64%
format 74.1±0.62ms 74.5±1.22ms +0.54%
goto_definition 364.1±5.25µs 357.8±9.14µs -1.73%
highlight 8.8±0.25ms 8.8±0.37ms 0.00%
hover 601.3±21.00µs 600.4±24.07µs -0.15%
idents_at_position 124.1±1.18µs 122.6±1.51µs -1.21%
inlay_hints 647.9±22.59µs 649.5±27.11µs +0.25%
on_enter 479.3±14.23ns 479.7±14.06ns +0.08%
parent_decl_at_position 3.6±0.05ms 3.6±0.05ms 0.00%
prepare_rename 369.5±19.30µs 357.2±6.83µs -3.33%
rename 9.5±0.74ms 9.6±0.46ms +1.05%
semantic_tokens 1105.2±16.37µs 1037.7±22.17µs -6.11%
token_at_position 358.3±3.57µs 359.5±3.17µs +0.33%
tokens_at_position 3.6±0.04ms 3.6±0.06ms 0.00%
tokens_for_file 427.7±6.13µs 425.3±3.24µs -0.56%
traverse 51.4±1.87ms 52.3±2.77ms +1.75%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When calling associated functions and operators, errors shown only on the first parameter
1 participant