Modify

Opened 11 years ago

Closed 10 years ago

#2364 closed Bug (Fixed)

Call with CallArgArray regression in beta

Reported by: Jpm Owned by: Jon
Milestone: 3.3.13.13 Component: AutoIt
Version: 3.3.9.9 Severity: None
Keywords: Cc:

Description

I found the following script does nt behave the same

Dim $args[1]
$args[0] = "CallArgArray"
$n = Call("Test1", $args)
MsgBox(262144,'Debug line ~' & @ScriptLineNumber,'Selection:' & @lf & '$n' & @lf & @lf & 'Return:' & @lf & $n & @lf & @lf & '@Error:' & @lf & @Error & @lf & @lf & '@Extended:' & @lf & @Extended) ;### Debug MSGBOX

Func Test1()
	Return 1
EndFunc

Attachments (0)

Change History (5)

comment:1 Changed 10 years ago by Jon

For reference, revision 7126 broke this.

comment:2 Changed 10 years ago by Jpm

one more ...

comment:3 follow-up: Changed 10 years ago by Jon

Actually, this is a change from 3.3.8.1 but it seems to be ok behaviour as I would expect it.

$args[0] contains "CallArgArray" which signifies that it will pass some additional parameters but doesn't declare any, but the function declaration doesn't accept any parameters so this triggers the error.

The fact that 3.3.8.1 didn't error on that because CallArgArray was missing the actual parameters, and now it does is not a problem for me.

It's also exceptionally hard to change the behaviour with the way that Call() was rewritten

comment:4 in reply to: ↑ 3 Changed 10 years ago by anonymous

What should I do if a script I'm using doesn't know how many arguments it should pass to Call and simply prepends a "CallArgArray"? Should I rewrite every function with an empty argument list to Func name ($bugFix = Default)?

comment:5 Changed 10 years ago by Jon

  • Milestone set to 3.3.13.13
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [10513] in version: 3.3.13.13

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jon.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.