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

Using parent and derived classes as param/return type hides the parent in hover #1506

Closed
Yamsha75 opened this issue Aug 29, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Yamsha75
Copy link

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Hover

Expected Behaviour

In this code snippet I expect that either base class A or both A|B would be displayed as function parameter and return in hover:

---@class A
---@class B : A

---@param a A|B
---@return A|B
function f(a) end

Actual Behaviour

However, only derived class B is displayed as types of both parameter and return.

image

Reproduction steps

Paste code snippet in a file and display hover of the function definition

Additional Notes

It may be an unusual case, but sometimes such argument type specificity is beneficial.

VS Code extension version: 3.5.3

Log File

No response

@sumneko sumneko added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Sep 1, 2022
@sumneko sumneko closed this as completed in bae4d2e Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants