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

Rename variable with Parinfer breaks code #2106

Closed
luontola opened this issue Feb 6, 2019 · 1 comment
Closed

Rename variable with Parinfer breaks code #2106

luontola opened this issue Feb 6, 2019 · 1 comment
Labels
bug Marks issues describing bugs released Marks issues which have had the fixes released in a stable build
Milestone

Comments

@luontola
Copy link

luontola commented Feb 6, 2019

In the following code, when you do Refactor > Rename on the foo variable and rename it to bar while Parinfer is enabled, then it produces the following broken code.

Before:

(ns example)

(let [foo (map (fn [x]
                 {:x x})
               [])])

After:

(ns example)

(let [bar (map (fn [x])
               {:x x})
      []])

Cursive version: v1.8.1-eap2-2018.3
IDEA version: IntelliJ IDEA 2018.3.4 (Ultimate Edition) Build #IU-183.5429.30

@luontola
Copy link
Author

The breakup happens already when triggering the rename refactoring, without actually renaming the variable.

Given the following code:

(let [foo (map (fn [_]
                 nil)
               [])])

...when you trigger the Rename refactoring on foo, then the code becomes:

(let [foo (map (fn [_])
              nil)
               []])

...and then when you press Enter to finish the refactoring, the code is refromatted to:

(let [foo (map (fn [_])
               nil)
      []])

Cursive version: 1.9.0-31-g24ab60e9
IDEA version: IntelliJ IDEA 2019.2.4 (Ultimate Edition) Build #IU-192.7142.36

@cursive-ide cursive-ide added this to the 1.13.0 milestone Apr 22, 2023
@cursive-ide cursive-ide modified the milestones: 1.13.0, 1.13.0-eap1 May 21, 2023
@cursive-ide cursive-ide added the bug Marks issues describing bugs label May 21, 2023
@cursive-ide cursive-ide added the released Marks issues which have had the fixes released in a stable build label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Marks issues describing bugs released Marks issues which have had the fixes released in a stable build
Projects
None yet
Development

No branches or pull requests

2 participants