[a104] problem with variadic property defined in class body Topic is solved

Discuss the future of the AutoHotkey language
Helgef
Posts: 3977
Joined: 17 Jul 2016, 01:02
Contact:

[a104] problem with variadic property defined in class body

31 Aug 2019, 03:18

Issue example,

Code: Select all

class a {
	static a[a*] => msgbox(a.length)	; 0, expected 2
}
a.a[1,2]	; Error:  No object to invoke.
These works as expected,

Code: Select all

class a {
	static a[a, aa*] => msgbox(a ':' aa.length)	; 1:1
}
a.a[1,2] ; OK

Code: Select all

a := {}
a.defineprop 'a', {get : (a*) => msgbox(a.length)}
a.a[1,2] ; 3
Cheers.

Return to “AutoHotkey v2 Development”

Who is online

Users browsing this forum: No registered users and 5 guests