From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20663 invoked by alias); 2 Apr 2017 05:39:10 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 20615 invoked by uid 89); 2 Apr 2017 05:39:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 02 Apr 2017 05:39:01 +0000 Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1cuYE8-0002b4-Ge; Sun, 02 Apr 2017 07:39:00 +0200 Received: from 70-36-239-167.dsl.dynamic.fusionbroadband.com ([70.36.239.167] helo=localhost.localdomain) by mailfront11.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1cuYDy-0008KB-Nl; Sun, 02 Apr 2017 07:38:50 +0200 Subject: Re: Help, writing kawa equivalent of java program To: Vasantha Ganesh , kawa@sourceware.org References: <58919df1-afe7-ae3b-0fdc-bb428c8ba3ed@bothner.com> From: Per Bothner Message-ID: Date: Sun, 02 Apr 2017 05:39:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <58919df1-afe7-ae3b-0fdc-bb428c8ba3ed@bothner.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q2/txt/msg00015.txt.bz2 On 04/01/2017 09:28 AM, Per Bothner wrote: > On 04/01/2017 08:54 AM, Vasantha Ganesh wrote: >> >> and this Kawa program: >> >> (define-simple-class kittens () >> (make-interface #t) >> (a::long)) >> >> (display kittens:class) >> >> I think both are equivalent, but kawa seems to think that I'm doing a >> type cast and throws this error message: >> >> Argument #1 'class kittens' to 'gnu.bytecode.Type.getReflectClass()' >> has wrong type (class) (java.lang.Class cannot be cast to >> gnu.bytecode.Type) >> at not_working.run(not_working.scm:5) >> at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:317) >> at gnu.expr.CompiledModule.evalModule(CompiledModule.java:42) >> at gnu.expr.CompiledModule.evalModule(CompiledModule.java:61) >> at kawa.Shell.runFile(Shell.java:538) >> at kawa.Shell.runFileOrClass(Shell.java:447) >> at kawa.repl.main(repl.java:881) >> Caused by: java.lang.ClassCastException: java.lang.Class cannot be >> cast to gnu.bytecode.Type >> ... 7 more > > That looks like a bug. I'll take a look. I checked in a fix (and a simplified testcase) for this. -- --Per Bothner per@bothner.com http://per.bothner.com/