SomeRanDev / reflaxe

Haxe framework for creating compilation targets using macros
MIT License
91 stars 4 forks source link

Fix repeat var fixer #18

Closed fourst4r closed 7 months ago

fourst4r commented 7 months ago

It took me waaaaaaaaaaaaaaaaaaay too long to figure out why this was happening...

Fixes the following issue:

var a = "asdf";
var b = a;
var a = 1234;
var b = a;
Sys.println(b);

output:

String a = 'asdf';
String b = a;
int a2 = 1234;
int b2 = a; // <-- should be a2
print(b2);

handleExpression was skipping the evaluation of the first expression.