This is the mail archive of the kawa@sourceware.org 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: location on define-constant


On 08/05/2012 11:36 PM, Chuah Teong Leong wrote:
I just discovered that it is impossible to get a location on a
variable defined using define-constant.
Is there another way to pass a reference of such a variable then?

(define-constant myint 12)
(define myint-loc
   (location myint))

java.lang.ClassCaseException: gnu.math.IntNum cannot be cast to
gnu.mapping.Location

Indeed, this is a bug - but why would you need to do this? You talk about passing a reference to the "variable" - but myint isn't variable (except perhaps in a mathematical sense) - it's a constant. Just pass the constant. -- --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]