This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with scoping of simple class definitions?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]