bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #6302] Internal define causes class cast exception


From: nobody
Subject: [Bug-kawa] [bug #6302] Internal define causes class cast exception
Date: Wed, 05 Nov 2003 23:16:45 -0500
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5b) Gecko/20030827

=================== BUG #6302: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6302&group_id=145

Changes by: Per Bothner <address@hidden>
Date: Thu 11/06/2003 at 04:16 (GMT)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Fixed
         Assigned to | None                      | bothner
              Status | Open                      | Closed


------------------ Additional Follow-up Comments ----------------------------
I checked in fixes for this.  The sample code now gives:

foo.scm:2:17: define is only allowed in a <body>





=================== BUG #6302: FULL BUG SNAPSHOT ===================


Submitted by: ctdean                  Project: Kawa                         
Submitted on: Sun 11/02/2003 at 00:21
Category:  Scheme language            Severity:  5 - Major                  
Bug Group:  Bad diagnostic            Resolution:  Fixed                    
Assigned to:  bothner                 Status:  Closed                       

Summary:  Internal define causes class cast exception

Original Submission:  After compiling this (admittedly strange) code, we get a 
class cast excpetion when run.  This code occurs in some autogenerated ares and 
is difficult to remove.



(define (foo)

  (format "~A" (define (bar) 1)))



(format #t "result is ~S~%" (foo2))





This gives:



  ((Foo) this).id$bar = (Symbol) (gnu.mapping.Procedure) bar$Fn1;



The cast to (Symbol) is not the right bytecode to generate.



Follow-up Comments
*******************

-------------------------------------------------------
Date: Thu 11/06/2003 at 04:16       By: bothner
I checked in fixes for this.  The sample code now gives:

foo.scm:2:17: define is only allowed in a <body>



-------------------------------------------------------
Date: Sun 11/02/2003 at 19:07       By: ctdean
Sure, I understand all that.  A compile time error is a fine solution.  Kawa is 
usually more forgiving than R5RS syntax, which is why I phrased it as I did.



Thanks!

-------------------------------------------------------
Date: Sun 11/02/2003 at 08:38       By: bothner
The code is more than strange - it is not valid Scheme code.   

You can have "internal definitions" in a <body>, but function

parameters are not a <body> in Scheme syntax.



The bug here is in Kawa not rejecting the program at

compile-time as having invalid syntax.


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6302&group_id=145

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]