public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: "Peter" <craven@gmx.net>
To: kawa mailing list <kawa@sourceware.org>
Subject: Problem with storing types in variables
Date: Tue, 09 Jul 2019 18:57:00 -0000	[thread overview]
Message-ID: <87a7dndojd.fsf@nexoid.at> (raw)

Hello ;)

A quick question:

 (float[][] length: 10)

works fine, as expected, however:

 (define faa float[][])
 (faa length: 10)

does not. This used to work in earlier versions of kawa, but now I get:

java.lang.ClassCastException: don't know how to coerce gnu.math.IntNum to float[]
	at gnu.bytecode.ObjectType.coerceFromObject(ObjectType.java:182)
	at gnu.kawa.reflect.Invoke.applyToObject(Invoke.java:191)
	at gnu.kawa.functions.ApplyToArgs.applyRest(ApplyToArgs.java:157)
	at gnu.kawa.functions.ApplyToArgs.applyToConsumerA2A(ApplyToArgs.java:134)
	at gnu.mapping.CallContext.runUntilDone(CallContext.java:586)
	at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:342)
	at gnu.expr.ModuleExp.evalModule(ModuleExp.java:211)
	at kawa.Shell.run(Shell.java:283)
	at kawa.Shell.run(Shell.java:196)
	at kawa.Shell.run(Shell.java:183)
	at kawa.repl.processArgs(repl.java:714)
	at kawa.repl.main(repl.java:820)

How do I call the constructor correctly, if it is called via a variable?

Thanks for any help with this!

Greetings, Peter

             reply	other threads:[~2019-07-09 18:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09 18:57 Peter [this message]
2019-07-09 22:18 ` Per Bothner
2019-07-10  3:02 ` Per Bothner

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=87a7dndojd.fsf@nexoid.at \
    --to=craven@gmx.net \
    --cc=kawa@sourceware.org \
    /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).