public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Panicz Maciej Godek <godek.maciek@gmail.com>
To: Per Bothner <per@bothner.com>
Cc: kawa <kawa@sourceware.org>
Subject: Re: Class does not implement the requested interface
Date: Thu, 4 Jan 2024 10:49:56 +0100	[thread overview]
Message-ID: <CAMFYt2Y0kTvx+Cf5oBDZjz45u0JssDd9nq-FxQSTD7KrvaEBZg@mail.gmail.com> (raw)
In-Reply-To: <CAMFYt2YEApEewuhy0f5gze1YSVzNhyVsZaFimMczG7HFUwAH4A@mail.gmail.com>

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

I have found the reason for the misbehavior:

Editor and NoEditor are defined in (editor interfaces elements), whereas
WithCursor is defined in (editor interfaces painting).

The (editor interfaces painting) is imported as a dependency by (editor
interfaces elements). The test imported both modules, but it imported
(editor interfaces elements) before its dependency.

Swapping the order of imports resolved the issue.

czw., 4 sty 2024, 07:59 użytkownik Panicz Maciej Godek <
godek.maciek@gmail.com> napisał:

> Thanks for explanation.
> But if the Editor interface extends WithCursor interface, and NoEditor
> implements Editor interface, doesn't it imply that it implements WithCursor
> interface?
>
> czw., 4 sty 2024, 02:19 użytkownik Per Bothner <per@bothner.com> napisał:
>
>> On 1/3/24 15:33, Panicz Maciej Godek via Kawa wrote:
>> > The thing is, that all the required methods from the interface
>> WithCursor
>> > are implemented by NoEditor.
>> >
>> > But I wonder why Kawa claims that the interface isn't implemented when
>> > clearly all the required methods are present.
>>
>> Kawa, like Java, requires an interface to be *explicitly* implemented by
>> a class.
>> It is not enough to implement all the methods of the interface.
>> --
>>         --Per Bothner
>> per@bothner.com   http://per.bothner.com/
>>
>

      reply	other threads:[~2024-01-04 10:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03 23:33 Panicz Maciej Godek
2024-01-04  1:18 ` Per Bothner
2024-01-04  6:59   ` Panicz Maciej Godek
2024-01-04  9:49     ` Panicz Maciej Godek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMFYt2Y0kTvx+Cf5oBDZjz45u0JssDd9nq-FxQSTD7KrvaEBZg@mail.gmail.com \
    --to=godek.maciek@gmail.com \
    --cc=kawa@sourceware.org \
    --cc=per@bothner.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).