bugKawa - Bugs: bug #47993, Spurious warning for throw in case...

 
 

bug #47993: Spurious warning for throw in case expression

Submitted by:  Nathan S. <nathans>
Submitted on:  Tue 24 May 2016 04:23:08 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 31 May 2016 01:11:00 PM UTC, comment #2:

Thanks!

Nathan S. <nathans>
Fri 27 May 2016 10:18:58 PM UTC, comment #1:

I believe Kawa is correct.

The clause
(else => (throw 'illegal-argument))
is equivalent to:
(else ((throw 'illegal-argument) idx))
That is (throw 'illegal-argument) is evaluated to a procedure,
which is then called with the value of idx as its argument.
Since (throw 'illegal-argument) can never evaluate to a procedure, Kawa correctly complains.

You probably want plain:
(else (throw 'illegal-argument))

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Tue 24 May 2016 04:23:08 AM UTC, original submission:

This procedure works correctly but generates a spurious warning message.

Either compiling or loading the file as a script generates the following warning:

Nathan S. <nathans>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #37244:  test.scm added by nathans (109B - application/vnd.lotus-screencam - script demonstrating issue)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Posted a comment)
  • -unavailable- added by nathans (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 31 May 2016 03:33:06 PM UTCbothnerOpen/ClosedOpen=>Closed
    Fri 27 May 2016 10:18:58 PM UTCbothnerStatusNone=>Invalid
      Assigned toNone=>bothner
    Tue 24 May 2016 04:23:08 AM UTCnathansAttached File-=>Added test.scm, #37244

    Back to the top


    Powered by Savane 3.1-cleanup1