Open DidierLoiseau opened 1 month ago
I just noticed that the same issue occurs if you simply try to extract a local variable from within the if
condition instead of performing an inlining. IntelliJ would normally split the if
in a similar way.
I guess this is what IntelliJ tries to do under the hood for the inlining (as shown when the plugin is disabled), and the at the source of the problem.
Consider the following code and try inlining
isEmpty2
:Not only does it fail (without reporting it), but it adds an additional
if (true)
:with the plugin disabled, it works:
(not the ideal result but at least it does not fail)
In addition, when I do that on my actual project I get an error notification from the plugin and the formatting gets broken:
(I did not try to reproduce this with an MRE, I guess it is a side effect of the first issue)