Changes between Initial Version and Version 1 of Ticket #65
- Timestamp:
- 01/24/08 20:51:18 (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #65
- Property Summary changed from Au3Check gives wrong warning with Const ByRef params to Au3Check gives wrong error with Const ByRef params
-
Ticket #65 – Description
initial v1 21 21 }}} 22 22 produces this error: 23 {{{ 23 24 New AutoIt v3 Script.au3(15,37) : ERROR: TakesConstByRef() previously called with expression on Const ByRef param(s). 24 25 Func TakesConstByRef(Const ByRef $c) … … 28 29 ~~~~~~~~~~~~~~~~~~^ 29 30 New AutoIt v3 Script.au3 - 1 error(s), 0 warning(s) 30 31 }}} 31 32 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.