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

REF: find occurrences for introduce constant/variable outside functions #5857

Merged
merged 1 commit into from
Aug 2, 2020

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 2, 2020

This PR modifies findOccurrences in extraxtExpressionUtils.kt so that it can find a corresponding context even if the extracted item is outside a function.

Fixes: #5844

@Kobzol Kobzol added the fix Pull requests that fix some bug(s) label Aug 2, 2020
Copy link
Member

@mchernyavsky mchernyavsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

bors r+

@mchernyavsky mchernyavsky self-assigned this Aug 2, 2020
@mchernyavsky mchernyavsky added this to the v128 milestone Aug 2, 2020
@bors
Copy link
Contributor

bors bot commented Aug 2, 2020

Build succeeded:

@bors bors bot merged commit bb172df into intellij-rust:master Aug 2, 2020
@Kobzol Kobzol deleted the ref-introduce-outside-function branch August 3, 2020 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull requests that fix some bug(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Introduce constant" refactoring breaks outside of functions
2 participants