This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Problems with scoping of simple class definitions?
- From: Per Bothner <per at bothner dot com>
- To: dominique dot boucher at nuecho dot com
- Cc: kawa at sources dot redhat dot com
- Date: Thu, 14 Oct 2004 14:04:25 -0700
- Subject: Re: Problems with scoping of simple class definitions?
- References: <200410141805.i9EI53e16317@almodovar.nuecho.ad>
Dominique Boucher wrote:
#|kawa:1|# (define-simple-class <A> (<Object>))
#|kawa:2|# (make <A>)
A@1de17f4
#|kawa:3|# (define (is-an-A? x) (instance? x <A>))
#|kawa:4|# (is-an-A? (make <A>))
java.lang.NoClassDefFoundError: A
The problem is that we need to call the ClassLoader for
line 3 to use the <A> defined in line 1. This has to be
done *in addition* to defining <A> in the global environment.
The fix to add a call to Compilation.usedClass.
I checked in the fix, plus a couple of other related fixes
and improvements.
--
--Per Bothner
per@bothner.com http://per.bothner.com/