Modify ↓
Opened 12 years ago
Closed 12 years ago
#2518 closed Bug (Fixed)
Static evaluates incorrect
| Reported by: | Owned by: | Jon | |
|---|---|---|---|
| Milestone: | 3.3.9.23 | Component: | AutoIt |
| Version: | 3.3.9.21 | Severity: | None |
| Keywords: | static | Cc: |
Description
Func _Test()
Return 7
EndFunc
Func _MyFirstFunc()
Local Static $Test = _Test(), $FuncName = 'Dummy One'
ConsoleWrite('FuncName is: ' & $FuncName & @CRLF)
EndFunc
Func _MySecendFunc()
Local Static $Test = _Test(), $FuncName = 'Dummy Two'
ConsoleWrite('FuncName is: ' & $FuncName & @CRLF)
EndFunc
_MyFirstFunc()
_MySecendFunc()
outputs:
FuncName is: Dummy One FuncName is: Dummy One
properly it would be:
FuncName is: Dummy One FuncName is: Dummy Two
Attachments (0)
Change History (5)
follow-up: 2 comment:1 by , 12 years ago
| Resolution: | → Duplicate |
|---|---|
| Status: | new → closed |
comment:2 by , 12 years ago
Replying to Jpm:
Already fixed in 3.3.9.22
is NOT fixed in 3.3.9.22 Forum Link
Func _Test()
Return 7
EndFunc
Func _Func_A()
Local Static $Test = _Test(), $String = 'This is a string.'
ConsoleWrite('_Func_A() string is: ' & $String & @CRLF)
EndFunc
Func _Func_B()
Local Static $Test = _Test(), $String = 'and this is another string.'
ConsoleWrite('_Func_B() string is: ' & $String & @CRLF)
EndFunc
_Func_A()
_Func_B()
the output is:
_Func_A() string is: This is a string. _Func_B() string is: This is a string.
but so it would be correct:
_Func_A() string is: This is a string. _Func_B() string is: and this is another string.
comment:3 by , 12 years ago
| Resolution: | Duplicate |
|---|---|
| Status: | closed → reopened |
I am sorry in my local dev environment (uppose to be in sync with the next beta)
it works fine, that's the reason I close it.
I ned now to find out why !!!
comment:4 by , 12 years ago
You will not believe the fix I proposed to Jon for #2372 is fixing this one too.
The only problem is Jon does not like it.
Wait and see
comment:5 by , 12 years ago
| Milestone: | → 3.3.9.23 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | reopened → closed |
Fixed by revision [9179] in version: 3.3.9.23
Note:
See TracTickets
for help on using tickets.

Already fixed in 3.3.9.22