public inbox for
 help / color / mirror / Atom feed
From: Per Bothner <>
To: "J. Vincent Toups" <>,
Subject: Re: Fwd: Value of given type cannot be case to its own type.
Date: Wed, 10 Feb 2021 08:50:24 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 2/10/21 8:38 AM, J. Vincent Toups via Kawa wrote:
> The issue was that I had defined a class called mecs in lib and there
> was also a library called mecs in lib. So there were two classes lying
> around called lib.mecs.
> It makes sense in retrospect but I wonder if it might not also make
> sense to indicate in the class name of a library that it is produced
> by a define-library form rather than a class definition to prevent
> such classes in most cases.

This is covered in moderate detail here:

It is convenient and flexible to compile both a library (lib mecs)
and a class mecs in package lib to the class lib.mecs.  Sometimes
(as you saw) there can be a clash, but I think the convenience
makes up for it.  Furthermore, changing it at this point might break things.

Kawa should catch this situation if both classes are produced by the same
invocation of the kawa command.  (If not, that is arguably a bug.)
However, if they're produced at different times, then it's harder to catch.

Also, if Kawa is confused by an existing incompatible lib.mecs class while it is
generating lib.mecs, that is also a bug.  I've run into some problems like that in the past,
and I've tried to fix them.  If you have a reproducible simple test-case I can take a look.
	--Per Bothner

      reply	other threads:[~2021-02-10 16:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 15:12 J. Vincent Toups
2021-02-10 15:35 ` Per Bothner
     [not found]   ` <>
2021-02-10 16:38     ` Fwd: " J. Vincent Toups
2021-02-10 16:50       ` Per Bothner [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:

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

  git send-email \ \ \ \ \

* 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).