id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,difficulty
853,coops: redefining things breaks methods,megane,felix winkelmann,"Tested with Version 4.7.5 (rev 5fe91ae)
{{{
;;; This works as supposed:
(require-extension coops)
(define-class )
(define-method (foo (i ))
(print ""foo v1""))
(define obj (make ))
(foo obj)
(define-class )
(define-method (foo (i ))
(print ""foo v2""))
(foo obj)
;; Output:
;; foo v1
;; foo v1 <- this is OK
;; Now, same with modules:
(module a
*
(import chicken scheme)
(use coops)
(define-class )
(define-method (foo (i ))
(print ""foo v1""))
)
(import a)
(define obj (make ))
(foo obj)
(module a
*
(import chicken scheme)
(use coops)
(define-class )
(define-method (foo (i ))
(print ""foo v2""))
)
(import a) ;; <- commenting this doesn't matter
;; Also, using different name altogether for the second module doesn't matter
(foo obj)
;; Output:
;; foo v1
;; Error: (foo) no method defined for given argument classes: (#'>)
}}}
",defect,closed,minor,,extensions,4.7.x,worksforme,,,