Page 1 of 1

Class methods don't raise an error when parameter missing

Posted: 25 Sep 2017, 06:15
by logithack1337
Hey everyone,

I'm not sure if this is actually a bug, but I've just encountered some strange behaviour when calling a class method without passing a parameter to it. I've discussed this with sj1k (Sjc1000) and a few other guys on #ahk and they hadn't experienced that problem before either.

Consider this code (expand):

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



If function() is called without a parameter, it raises an error, whereas t.method() just stops. Has anyone encountered this before?

Thanks for your help!

Regards,

logithack

Re: Class methods don't raise an error when parameter missing

Posted: 25 Sep 2017, 09:27
by nnnik
Yes I think it is intended.

Re: Class methods don't raise an error when parameter missing

Posted: 25 Sep 2017, 10:38
by Helgef
I'm not sure where or if this is documented, but it is known and applies to all function references and bound funcs. :wave:
Cheers

Spoiler