public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* A protected slot is not accessible in a subclass
@ 2022-03-24 22:14 Panicz Maciej Godek
  2022-03-25  4:56 ` Per Bothner
  0 siblings, 1 reply; 5+ messages in thread
From: Panicz Maciej Godek @ 2022-03-24 22:14 UTC (permalink / raw)
  To: kawa

Hi,
I'm trying to sub-class the class gnu.mapping.Symbol from within Kawa.
In the source code, the class has a protected field:

protected String name;

But when I subclass it like this:

(define-simple-class S (gnu.mapping.Symbol)
  ((*init*)
   (invoke-special gnu.mapping.Symbol (("foo":toString):intern)
gnu.mapping.Namespace:EmptyNamespace)
   (set! name (("bar":toString):intern))))

I get the following error:

slot 'name' in gnu.mapping.Symbol not accessible here

What are the rules for accessing protected members in Kawa?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-25 20:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-24 22:14 A protected slot is not accessible in a subclass Panicz Maciej Godek
2022-03-25  4:56 ` Per Bothner
2022-03-25  9:59   ` Panicz Maciej Godek
2022-03-25 18:46     ` Per Bothner
2022-03-25 20:53       ` Panicz Maciej Godek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).