Menu

#1 SplitTemp fails with nested assignment

open
nobody
None
5
2002-12-31
2002-12-31
No

Bug: SplitTemp refactoring fails in some usual cases
o Details:

int tmp = 2;
if ( a==0 ) tmp = 3;
a = tmp;

SplitTemp? on this example will result in wrong
code.

o Solution:

We could add the scope check to throw a refactoring
error for the first. Later on we can add the new
declaration on the same scope level as the original
declaration.

(Reported by Andre)

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.