[armedbear] #485: Non-congruent generic method signatures cannot be eval'd
#485: Non-congruent generic method signatures cannot be eval'd -------------------------------+------------------------- Reporter: Mark Evenson | Type: defect Status: new | Priority: major Milestone: 1.8.1 | Component: interpreter Version: 1.8.1-dev | Keywords: Parent Tickets: | -------------------------------+------------------------- <https://irclog.tymoon.eu/freenode/%23abcl?from=1611187078> {{{ 0:12:54 emaczen Is there a setting I can change in ABCL to not care if a method definition does not have all the keyword arguments as another method? 0:13:14 emaczen does not accept all of the keyword arguments defined for the generic function -- This is the ABCL error I am getting 0:13:42 emaczen SBCL and CCL do not care 0:30:42 charles` Is that only for keyword arguments, because SBCL definitely cares if I have different # of parameters for same method name 1:19:18 robertm Maybe you could use &allow-other-keys ? (Just a guess.) 1:53:50 etimmons emaczen: Based on your description and some quick tests I'm guessing you're implicitly defining the generic function with defmethod. Try using an explicit defgeneric. 1:57:24 etimmons It does appear there's a bug in how defmethod defines the lambda list of the implicit defgeneric https://plaster.tymoon.eu/view/2247#2247 2:00:37 etimmons If (fboundp function-name) is nil, a generic function is created [...] the lambda list of the generic function will mention ..... key (but no keyword arguments) }}} Eval'ing non-congruent forms fails with a {{{simple-error}}} but compiling seems to work. -- Ticket URL: <https://abcl.org/trac/ticket/485> armedbear <https://abcl.org> armedbear
#485: Non-congruent generic method signatures cannot be eval'd -------------------------------+----------------------- Reporter: Mark Evenson | Owner: (none) Type: defect | Status: new Priority: major | Milestone: 1.8.1 Component: interpreter | Version: 1.8.1-dev Resolution: | Keywords: Parent Tickets: | -------------------------------+----------------------- Comment (by Mark Evenson): jackdaniel schooled easye on #abcl: {{{ l easye: the congruency between the gf and the method is defined (among other rules), that method must have all key arguments from the generic function 18:04:06 jackdaniel it may have more though 18:04:45 jackdaniel when you implicitly define the generic function via defmethod, and defmethod has &key arguments, the generic function is defined as (defgeneric foo (a &key)) [i.e for (defmethod foo ((a integer) &key z d)) 18:05:02 jackdaniel so they are in fact congruent 18:09:45 easye Alright. That's right: one doesn't typically use keyword arguments with generic functions for this reason. }}} -- Ticket URL: <https://abcl.org/trac/ticket/485#comment:1> armedbear <https://abcl.org> armedbear
#485: Differing &keyword generic method signatures cannot be eval'd -------------------------------+----------------------- Reporter: Mark Evenson | Owner: (none) Type: defect | Status: new Priority: major | Milestone: 1.8.1 Component: interpreter | Version: 1.8.1-dev Resolution: | Keywords: Parent Tickets: | -------------------------------+----------------------- -- Ticket URL: <https://abcl.org/trac/ticket/485#comment:2> armedbear <https://abcl.org> armedbear
#485: Differing &keyword generic method signatures cannot be eval'd -------------------------------+----------------------- Reporter: Mark Evenson | Owner: (none) Type: defect | Status: new Priority: major | Milestone: 1.8.1 Component: interpreter | Version: 1.8.1-dev Resolution: | Keywords: Parent Tickets: | -------------------------------+----------------------- Comment (by Mark Evenson): The following forms will compile as a file unit, but fail when evaluated in a REPL. {{{ (in-package :cl-user) (defmethod test ((a integer) &key b c) (declare (ignore a b c))) (defmethod test ((a real) &key b) (declare (ignore (a b)))) }}} -- Ticket URL: <https://abcl.org/trac/ticket/485#comment:3> armedbear <https://abcl.org> armedbear
#485: Differing &keyword generic method signatures cannot be eval'd -------------------------------+----------------------- Reporter: Mark Evenson | Owner: (none) Type: defect | Status: new Priority: major | Milestone: 1.8.1 Component: interpreter | Version: 1.8.1-dev Resolution: | Keywords: Parent Tickets: | -------------------------------+----------------------- Comment (by Mark Evenson): Proposal to fix <https://github.com/armedbear/abcl/pull/381>. -- Ticket URL: <https://abcl.org/trac/ticket/485#comment:4> armedbear <https://abcl.org> armedbear
#485: Differing &keyword generic method signatures cannot be eval'd -------------------------------+----------------------- Reporter: Mark Evenson | Owner: (none) Type: defect | Status: closed Priority: major | Milestone: 1.8.1 Component: interpreter | Version: 1.8.1-dev Resolution: fixed | Keywords: Parent Tickets: | -------------------------------+----------------------- Changes (by Mark Evenson): * status: new => closed * resolution: => fixed Comment: Fixed with <https://github.com/armedbear/abcl/commit/1d9020eb80d0e03975a5c89052902811b7aa4c80> aka <https://abcl.org/trac/changeset/15513> thanks to @alejandrozf. -- Ticket URL: <https://abcl.org/trac/ticket/485#comment:5> armedbear <https://abcl.org> armedbear
participants (1)
-
armedbear