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

[Improvement]: Provide the add check error code action for a call-stmt #42507

Closed
nipunayf opened this issue Apr 9, 2024 · 0 comments · Fixed by #42637
Closed

[Improvement]: Provide the add check error code action for a call-stmt #42507

nipunayf opened this issue Apr 9, 2024 · 0 comments · Fixed by #42637
Assignees
Labels
Area/CodeAction Language Server Code Actions Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Improvement
Milestone

Comments

@nipunayf
Copy link
Contributor

nipunayf commented Apr 9, 2024

Description

As shown below, the relevant CA is not provided for a call-stmt.

image

Describe your problem(s)

No response

Describe your solution(s)

Similar to how the CA is provided call-expr, provide the respective CA for the following cursor position.

function fn() returns error? => ();

function name() {
    <CURSOR>fn();
}

It should generate the following code:

function fn() returns error? => ();

function name() returns error? {
    check fn();
}

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@nipunayf nipunayf added Type/Improvement Team/LanguageServer Language Server Implementation related issues. #Compiler Area/CodeAction Language Server Code Actions labels Apr 9, 2024
@nipunayf nipunayf changed the title [Improvement]: Provide the add check error CA when the function is invoked as a statement [Improvement]: Provide the add check error CA for a call-stmt Apr 9, 2024
@nipunayf nipunayf changed the title [Improvement]: Provide the add check error CA for a call-stmt [Improvement]: Provide the add check error code action for a call-stmt Apr 9, 2024
@KavinduZoysa KavinduZoysa moved this from BackLog to In Progress in Ballerina Team Main Board Apr 25, 2024
@nipunayf nipunayf moved this from In Progress to PR Sent in Ballerina Team Main Board Apr 25, 2024
@github-project-automation github-project-automation bot moved this from PR Sent to Done in Ballerina Team Main Board Apr 29, 2024
@nipunayf nipunayf added this to the 2201.10.0 milestone May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/CodeAction Language Server Code Actions Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Improvement
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant