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

Create Variable Code Action is not accurate for query expression #37256

Closed
malinthar opened this issue Aug 4, 2022 · 3 comments · Fixed by #41117
Closed

Create Variable Code Action is not accurate for query expression #37256

malinthar opened this issue Aug 4, 2022 · 3 comments · Fixed by #41117
Assignees
Labels
Area/CodeAction Language Server Code Actions Points/2 Equivalent to two days effort Priority/High Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Status/Blocked Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Bug

Comments

@malinthar
Copy link
Contributor

Description:
Consider the following scenario
Peek 2022-08-04 13-45

Steps to reproduce:

public function main() {
    xml x1 = xml `<book>The Lost World</book>`;

    string[] xmlResult = from xml element in x1 select element.toBalString();
}

Affected Versions:
2201.2.x

@malinthar malinthar added Type/Bug Team/LanguageServer Language Server Implementation related issues. #Compiler Area/CodeAction Language Server Code Actions labels Aug 4, 2022
@sanjana sanjana added the Points/3 Equivalent to three days effort label Aug 12, 2022
@TharushiJay
Copy link
Contributor

Blocked by #37450

@malinthar
Copy link
Contributor Author

According to the spec, the compiler can't infer the type of expression from xml element in x1 select element.toBalString();. Therefore the expected type is OTHER. Therefore the code action should not be suggested. This is fixed with #41117

@github-actions
Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

@pcnfernando pcnfernando added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Aug 18, 2023
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 Points/2 Equivalent to two days effort Priority/High Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Status/Blocked Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Bug
Projects
Archived in project
6 participants