[Openmcl-devel] Problems with call-next-method in 1.4-dev-r12912M-trunk (WindowsX8632)

Matthew Swank akopa.gmane.poster at gmail.com
Mon Oct 5 12:20:29 PDT 2009


This looks like it should work ok:

CL-USER> (defgeneric foo (bar baz))
#<STANDARD-GENERIC-FUNCTION FOO #xA8F3C1E>

CL-USER> (defmethod foo ((bar (eql 'bar)) (baz string))
	   (call-next-method bar (length baz)))
#<STANDARD-METHOD FOO ((EQL BAR) STRING)>

CL-USER> (defmethod foo ((bar (eql 'bar)) baz)
	   (cons baz baz))
#<STANDARD-METHOD FOO ((EQL BAR) T)>

CL-USER> (foo 'bar "baz")

=>
Applicable-methods changed in call-next-method.
Should be: (#<STANDARD-METHOD FOO ((EQL BAR) STRING)>
            #1=#<STANDARD-METHOD FOO (# T)>)
Was: (#1#)
Next-methods: (#1#)
   [Condition of type SIMPLE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [ABORT] Return to SLIME's top level.
 2: [ABORT-BREAK] Reset this thread
 3: [ABORT] Kill this thread

Backtrace:
  0: ((:INTERNAL CCL::DO-IT CCL::%%CNM-WITH-ARGS-COMBINED-METHOD-DCODE)
#(#<STANDARD-GENERIC-FUNCTION FOO #xA84C996> (#1=#<STANDARD-METHOD FOO #>
#2=#<#>) NIL NIL (#1# #2#)) (BAR 3))
      Locals:
        CCL::THING = #(#<STANDARD-GENERIC-FUNCTION FOO #xA84C996> ..))
        CCL::ARGS = (BAR 3)
        CCL::ARGS-LEN = 2
        CCL::GF = #<STANDARD-GENERIC-FUNCTION FOO #xA84C996>
        CCL::NUMREQ = 2
        CCL::NEXT-METHODS = (#<STANDARD-METHOD FOO ((EQL BAR) T)>)
        CCL::OLD-ARGS = 12108566
        CCL::NEW-METHODS = (#<STANDARD-METHOD FOO ((EQL BAR) T)>)
        CCL::OLD-METHODS = (#<STANDARD-METHOD FOO ((EQL BAR) STRING)>
#<STANDARD-METHOD FOO (# T)>)
        CCL::MAGIC = (#(#<STANDARD-GENERIC-FUNCTION FOO #xA84C996> (#<#> #<#>)
NIL NIL ..)))))
  1: (CCL::%%CNM-WITH-ARGS-COMBINED-METHOD-DCODE #(#<STANDARD-GENERIC-FUNCTION
FOO #xA84C996> (#1=#<STANDARD-METHOD FOO #> #2=#<#>) NIL NIL (#1# #2#)) (BAR 3)
(#(#<STANDARD-GENERIC-FUNCTION FOO #xA84C996> ..
      Locals:
        CCL::THING = #(#<STANDARD-GENERIC-FUNCTION FOO #xA84C996> ..))
        CCL::ARGS = (BAR 3)
        CCL::MAGIC = (#(#<STANDARD-GENERIC-FUNCTION FOO #xA84C996> (#<#> #<#>)
NIL NIL ..)))))
  2: (CCL::%CALL-NEXT-METHOD-WITH-ARGS (#(#<STANDARD-GENERIC-FUNCTION FOO
#xA84C996> (#1=#<#> #2=#<#>) NIL NIL (#1# #2#)) (#2#) . 12108566) BAR 3)
      Locals:
        CCL::MAGIC = (#(#<STANDARD-GENERIC-FUNCTION FOO #xA84C996> (#<#> #<#>)
NIL NIL ..)))))
        CCL::ARGS = (BAR 3)
        CCL::METHODS = (#<STANDARD-METHOD FOO ((EQL BAR) T)>)
        CCL::CNM-CM = #(#<STANDARD-GENERIC-FUNCTION FOO #xA84C996> ..))
        CCL::THE-VECT = #(#<STANDARD-GENERIC-FUNCTION FOO #xA84C996> ..))
  3: (CCL::%%CNM-WITH-ARGS-COMBINED-METHOD-DCODE #(#<STANDARD-GENERIC-FUNCTION
FOO #xA84C996> (#1=#<STANDARD-METHOD FOO #> #2=#<#>) NIL NIL (#1# #2#)) 12108566
NIL)
      Locals:
        CCL::THING = #(#<STANDARD-GENERIC-FUNCTION FOO #xA84C996> ..))
        CCL::ARGS = 12108566
        CCL::MAGIC = NIL
        CCL::METHODS = (#<STANDARD-METHOD FOO ((EQL BAR) STRING)>
#<STANDARD-METHOD FOO (# T)>)
        CCL::CAR-METHS = #<STANDARD-METHOD FOO ((EQL BAR) STRING)>
        CCL::CELL-2 = ((#<STANDARD-METHOD FOO (# T)>) . 12108566)
        CCL::MAGIC = (#(#<STANDARD-GENERIC-FUNCTION FOO #xA84C996> (#<#> #<#>)
NIL NIL ..)))))
        #:G103106 = (#(#<STANDARD-GENERIC-FUNCTION FOO #xA84C996> (#<#> #<#>)
NIL NIL ..)))))
        #:G103107 = #<METHOD-FUNCTION FOO ((EQL BAR) STRING)>
        #:G103108 = 12108566
  4: (NIL #<Unknown Arguments>)
      [No Locals]
  5: (NIL #<Unknown Arguments>)
      [No Locals]
  6: (CCL::CALL-CHECK-REGS FOO BAR "baz")
  
....




More information about the Openmcl-devel mailing list