Opened 16 years ago
Closed 15 years ago
#122 closed defect (wontfix)
tinyclos generic mechanism gets confused by a surplus of arguments.
| Reported by: | Tony Sidaway | Owned by: | Tony Sidaway |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | extensions | Version: | 4.2.x |
| Keywords: | tinyclos generics | Cc: | |
| Estimated difficulty: |
Description
(define-generic G)
(define-method (G (a <exact>)) (+ a a))
(G 10)
===> 20
(G 10 11)
Error: bad argument count - received 3 but expected 2: #<procedure (? call-next-method a)
The exact same bug also exists in the Chicken 3 tinyclos egg on Chicken 3.4.0
Change History (3)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
| Owner: | set to |
|---|---|
| Status: | new → accepted |
comment:3 by , 15 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | accepted → closed |
I close this, since I consider tinyclos obsolete, and because nobody seems to work on this anymore.
Note:
See TracTickets
for help on using tickets.

To clarify, the generic dispatch mechanism should identify the call as one for which it has no applicable methods. It should not call a method unless that method is specified so as to accept the argument list presented.
Here's an example of the desired behavior as seen in another system based on tinyclos. The define-method syntax is slightly different but it's basically the same code.
stklos> (define-generic G)
;; g
stklos> (define-method G((a <integer>)) (+ a a))
;; g
stklos> (G 1)
2
stklos> (G 1 2)
Error:
error: no applicable method for #[<generic> g (1)]
in call (g 1 2)