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

Renaming member of a kwdef struct is incorrect #912

Closed
Octogonapus opened this issue Mar 16, 2021 · 1 comment · Fixed by #914
Closed

Renaming member of a kwdef struct is incorrect #912

Octogonapus opened this issue Mar 16, 2021 · 1 comment · Fixed by #914
Labels

Comments

@Octogonapus
Copy link

I am using Julia 1.6.0-rc2 and the Julia vscode extension v1.1.35. Given this code:

Base.@kwdef struct Foo
    x::Int
end

foo(f::Foo) = f.x

Placing your cursor on f.x and renaming x to y works as expected:

Base.@kwdef struct Foo
    y::Int
end

foo(f::Foo) = f.y

However, placing your cursor on x::Int and renaming x to y renames the struct to y instead:

Base.@kwdef struct y
    x::Int
end

foo(f::y) = f.x
@pfitzseb pfitzseb added the bug label Mar 16, 2021
@pfitzseb pfitzseb mentioned this issue Mar 17, 2021
2 tasks
@pfitzseb
Copy link
Member

Yeah, that happens when the cursor is in front of the x::Int -- x|::Int works fine. Will be fixed by #914.

@davidanthoff davidanthoff added this to the Backlog milestone Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants