mmikeww / AHK-v2-script-converter

AHK v1 -> v2 script converter
https://autohotkey.com/boards/viewtopic.php?f=6&t=25100
The Unlicense
580 stars 44 forks source link

Issues with function calls that need ByRef -> & and multi-statement #298

Closed Banaanae closed 1 week ago

Banaanae commented 1 month ago

V1:

MyFunc(ByRef a, ByRef b) {}

MyFunc(a, b)
MyFunc(a, b), a = b ; Stripped
MyFunc(a, b) ; Stripped

V2 (Converted):

MyFunc(&a, &b) {}

MyFunc(&a, &b)
MyFunc(&a, &b)
MyFunc(&a, &b)

V2 (Expected):

MyFunc(&a, &b) {}

MyFunc(&a, &b)
MyFunc(&a, &b), a = b ; Stripped
MyFunc(&a, &b) ; Stripped

Adding below lines causes more strange behaviour (both commented and un)

; MyFunc(a, b), Ord(1)
; MyFunc(a, b), MyFunc(a, b)