Child pages
  • Inline Variable Refactoring
Skip to end of metadata
Go to start of metadata

This refactoring lets you remove unnecessary local variables.

Icon

Mutable and non-local variables are not affected, see screenshot below.

To inline a variable, place caret on its declaration or usage and press Alt+Ctrl+N.

Before

After

Icon

This refactoring cannot resolve conflicts that may occur when you are creating a new mutable instance, and change it's state after. So, use it with care.

  • No labels