Custom Query (3920 matches)
Results (355 - 357 of 3920)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #65 | Wont Fix | Au3Check gives wrong error with Const ByRef params | ||
| Description |
The following code: CallNonConst() CallConst() Func CallNonConst() Local $a = 32 TakesConstByRef($a) EndFunc Func CallConst() Local Const $a = 32 TakesConstByRef($a) EndFunc Func TakesConstByRef(Const ByRef $c) ConsoleWrite($c & @CRLF) EndFunc produces this error: New AutoIt v3 Script.au3(15,37) : ERROR: TakesConstByRef() previously called with expression on Const ByRef param(s). Func TakesConstByRef(Const ByRef $c) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ New AutoIt v3 Script.au3(6,20) : REF: first call to TakesConstByRef(). TakesConstByRef($a) ~~~~~~~~~~~~~~~~~~^ New AutoIt v3 Script.au3 - 1 error(s), 0 warning(s) The error is wrong. The code is perfectly valid. The problem is using a non-const and a const in the same script with the same function. It seems Au3Check is trying to infer something incorrectly. If you modify both examples to be identical (Either add Const to the Local it's missing from or remove it from the one where it's present) then there is no error. All Au3Check needs to worry about is making sure a variable is being passed to the ByRef statement, it doesn't need to concern itself if the variable is Const or not. |
|||
| #3521 | No Bug | Au3Check is not able to recognize Global variables declared inside functions if the variables are used above the function declaration | ||
| Description |
Au3Check is not able to recognise Global variables declared inside functions if the variables are used above the function declaration. Here is an example script which demonstrates this: CreateVariable() ConsoleWrite($sGlobalVariable & @CRLF) Func CreateVariable() Global $sGlobalVariable = "Foobar" EndFunc Au3Check throws a nasty warning if you run the code above: >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\TheDcoder\Desktop\AIO AutoIt Test Script.au3" /UserParams +>16:28:48 Starting AutoIt3Wrapper v.16.306.1237.0 SciTE v.3.6.2.0 Keyboard:00000409 OS:WIN_81/ CPU:X64 OS:X64 Environment(Language:0809) CodePage:0 utf8.auto.check:4 # detect ascii high characters and if none found set default encoding to UTF8 and do not add BOM +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\TheDcoder\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\TheDcoder\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.1) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\TheDcoder\Desktop\AIO AutoIt Test Script.au3 "C:\Users\TheDcoder\Desktop\AIO AutoIt Test Script.au3"(3,31) : warning: $sGlobalVariable: possibly used before declaration. ConsoleWrite($sGlobalVariable & ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\TheDcoder\Desktop\AIO AutoIt Test Script.au3 - 0 error(s), 1 warning(s) ->16:28:48 AU3Check ended. Press F4 to jump to next error.rc:1 >Running:(3.3.14.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\TheDcoder\Desktop\AIO AutoIt Test Script.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop Foobar +>16:28:48 AutoIt3.exe ended.rc:0 +>16:28:48 AutoIt3Wrapper Finished. >Exit code: 0 Time: 0.9746 |
|||
| #3666 | Wont Fix | Au3Check issue when error is in include at last line and there is no crlf at the end | ||
| Description |
Try to run: Track_Au3Check_Main.au3 "Z:\AutoItPortable\__COMUNITY\TRACK\Track_Au3Check_Main.au3"(2,34) : warning: $A: possibly used before declaration. $A ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "Z:\AutoItPortable\__COMUNITY\TRACK\Track_Au3Check_Main.au3"(2,34) : error: Statement cannot be just an expression. $A ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "Z:\AutoItPortable\__COMUNITY\TRACK\Track_Au3Check_Main.au3"(2,34) : error: $A: undeclared global variable. $A ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Z:\AutoItPortable\__COMUNITY\TRACK\Track_Au3Check_Main.au3 - 2 error(s), 1 warning(s) After quick check you can found out that: the problem is not located in Track_Au3Check_Main.au3 ... but it is inside Track_Au3Check_UDF.au3 as a last line. Au3Check should show proper line and udf file . |
|||
