Code: Select all
#Requires AutoHotkey v2.0-a136-feda41f4
class Parent {
ExistsButCalledWithMismatchedNumberOfArguments() => ''
}
class Child extends Parent {
__New() {
super('a', 'b', 'c') ; doesnt throw, this is unexpected
super.Call('a', 'b', 'c') ; doesnt throw, this is unexpected
super.NoSuchMethodExists('a', 'b', 'c') ; doesnt throw, this is unexpected
; super.ExistsButCalledWithMismatchedNumberOfArguments('a', 'b', 'c') ; throws, this is expected
}
}
C := Child()
MsgBox 'if u got to here without seeing a msgbox, super.??? failed silently'