Changes between Initial Version and Version 1 of Ticket #65


Ignore:
Timestamp:
01/24/08 20:51:18 (17 years ago)
Author:
Valik
Comment:

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  
    2121}}}
    2222produces this error:
     23{{{
    2324New AutoIt v3 Script.au3(15,37) : ERROR: TakesConstByRef() previously called with expression on Const ByRef param(s).
    2425Func TakesConstByRef(Const ByRef $c)
     
    2829        ~~~~~~~~~~~~~~~~~~^
    2930New AutoIt v3 Script.au3 - 1 error(s), 0 warning(s)
    30 
     31}}}
    3132The 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.