1.1 --- a/templates/progops.c Fri Nov 25 21:55:37 2016 +0100
1.2 +++ b/templates/progops.c Fri Nov 25 22:02:58 2016 +0100
1.3 @@ -66,7 +66,7 @@
1.4 {
1.5 /* Obtain the __args__ special member, referencing the parameter table. */
1.6
1.7 - __attr minparams = __load_via_object(callable.value, __pos___args__);
1.8 + __attr minparams = __check_and_load_via_object(callable.value, __pos___args__, __code___args__);
1.9
1.10 /* Refer to the table and minimum/maximum. */
1.11
2.1 --- a/tests/methods_unbound.py Fri Nov 25 21:55:37 2016 +0100
2.2 +++ b/tests/methods_unbound.py Fri Nov 25 22:02:58 2016 +0100
2.3 @@ -69,6 +69,7 @@
2.4 # Main program.
2.5
2.6 c = C()
2.7 +d = D()
2.8
2.9 try:
2.10 print f(C, 1) # fails
2.11 @@ -100,3 +101,13 @@
2.12 print h(c, getd) # should fail with an error caused by a guard
2.13 except TypeError:
2.14 print "h(c, getd): getd provides an unsuitable result."
2.15 +
2.16 +try:
2.17 + print h(d, 0)(4) # should fail with an error caused by a test
2.18 +except TypeError:
2.19 + print "h(d, 0): d is not a suitable argument."
2.20 +
2.21 +try:
2.22 + print g(c, 1)(5)
2.23 +except TypeError:
2.24 + print "g(c, 1)(5): attempt to invoke an integer result from g."