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

[Bug]: Qualified name reference completions not working in function body statement context #38851

Closed
IMS94 opened this issue Nov 28, 2022 · 3 comments · Fixed by #41178
Closed
Assignees
Labels
Area/Completion Issues related to Language Server Auto Completions Points/2 Equivalent to two days effort Priority/High Reason/Other None of the other reasons. Status/Blocked Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Bug

Comments

@IMS94
Copy link
Contributor

IMS94 commented Nov 28, 2022

Description

Consider:

import ballerina/http;

public function main() {
    http:<cursor>

    map<string> data = {};
}

At cursor, completions provided are invalid (we get expression context like completions). We should be getting completions from the http module.

Steps to Reproduce

See description

Affected Version(s)

2201.3.0-rc3

OS, DB, other environment details and versions

No response

Related area

-> Editor

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@IMS94 IMS94 added Type/Bug Team/LanguageServer Language Server Implementation related issues. #Compiler Area/Completion Issues related to Language Server Auto Completions Priority/High labels Nov 28, 2022
@IMS94 IMS94 assigned mindula and IMS94 and unassigned mindula Nov 30, 2022
@IMS94 IMS94 added the Points/2 Equivalent to two days effort label Dec 2, 2022
@IMS94
Copy link
Contributor Author

IMS94 commented Dec 12, 2022

This happens only when qName ref is followed by a map variable declaration:

public function main() {
    module1:<cursor>

    map<int> m = {};
}

Doesn't happens for cases like

    http:

    string m = "";

and

   http:

    table<Data> tbl = table [];

@IMS94
Copy link
Contributor Author

IMS94 commented Dec 12, 2022

Blocked by #39016

@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.

@mindula mindula added the Reason/Other None of the other reasons. label Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Completion Issues related to Language Server Auto Completions Points/2 Equivalent to two days effort Priority/High Reason/Other None of the other reasons. Status/Blocked Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants