[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #853: coops: redefining things breaks methods
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #853: coops: redefining things breaks methods |
Date: |
Fri, 18 May 2012 10:34:10 -0000 |
#853: coops: redefining things breaks methods
------------------------+---------------------------------------------------
Reporter: megane | Owner:
Type: defect | Status: new
Priority: minor | Milestone: 4.8.0
Component: extensions | Version: 4.7.x
Keywords: |
------------------------+---------------------------------------------------
Tested with Version 4.7.5 (rev 5fe91ae)
{{{
;;; This works as supposed:
(require-extension coops)
(define-class <a>)
(define-method (foo (i <a>))
(print "foo v1"))
(define obj (make <a>))
(foo obj)
(define-class <a>)
(define-method (foo (i <a>))
(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 <a>)
(define-method (foo (i <a>))
(print "foo v1"))
)
(import a)
(define obj (make <a>))
(foo obj)
(module a
*
(import chicken scheme)
(use coops)
(define-class <a>)
(define-method (foo (i <a>))
(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: (#<coops
standard-class `<a>'>)
}}}
--
Ticket URL: <http://bugs.call-cc.org/ticket/853>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #853: coops: redefining things breaks methods,
Chicken Trac <=