public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* Default methods in interfaces
@ 2023-02-27 10:09 Panicz Maciej Godek
  0 siblings, 0 replies; only message in thread
From: Panicz Maciej Godek @ 2023-02-27 10:09 UTC (permalink / raw)
  To: kawa

[-- Attachment #1: Type: text/plain, Size: 781 bytes --]

Hi,
is there a way to use interface default methods in Kawa?

suppose that I have an interface defined like this:

(define-simple-class I () interface: #t
  ((m key) #!abstract)
  ((contains key)::boolean (not (eq? #!null (m key)))))

When I try running this raw, Kawa complains:

Exception in thread "main" java.lang.ClassFormatError: Code attribute in
native or abstract methods in class file I

But when I try to add allocation: 'default or access: 'default before the
method's body, I get either

unknown allocation specifier

or

unknown access specifier (quote default)

error. I haven't found any mention of "default methods" in the Kawa manual,
so I wonder whether this feature is supported, or whether it would be hard
to add support for it to Kawa.

Best regards,
Panicz

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-27 10:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 10:09 Default methods in interfaces 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).