Andy Wingo schreef op vr 11-02-2011 om 16:39 [+0100]:
> On Wed 02 Feb 2011 14:34, Jan Nieuwenhuizen <jann...@gnu.org> writes:

> Do you have a test case?

It was in the attached tarball, I'm attaching the individual files.

Jan

-- 
Jan Nieuwenhuizen <jann...@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ®  http://AvatarAcademy.nl  
#! /bin/sh
# -*- scheme -*-
exec guile --debug -L $(dirname $0) -s $0 "$@"
!#

(use-modules
 (oop goops)
 (base)
 (impl-a)
 (impl-b)
 )

(define obj (make <impl-a>))

(func obj)

(func-impl obj)
(define-module (impl-b)
  #:use-module (oop goops)
  #:use-module (base)
  #:export (<impl-b>
	    func-impl)
  #:re-export (func))

(define-class <impl-b> (<base>))

(define-method (func (self <impl-b>))
  (format #t "<impl-b>: func\n"))

(define-method (func-impl (self <impl-a>))
  (format #t "<impl-a>: func-impl\n"))
(define-module (impl-a)
  #:use-module (oop goops)
  #:use-module (base)
  #:export (<impl-a>
	    func-impl)
  #:re-export (func))

(define-class <impl-a> (<base>))

(define-method (func (self <impl-a>))
  (format #t "<impl-a>: func\n"))

(define-method (func-impl (self <impl-a>))
  (format #t "<impl-a>: func-impl\n"))
(define-module (base)
  #:use-module (oop goops)
  #:export (<base>
	    func))

(define-class <base> ())

(define-method (func (self <base>))
  (format #t "<base>: func\n"))

Reply via email to